0👍
Wild shot in the dark here but the #
in your nextpage
query parameter is probably messing with the remote site.
What it will see is
QUERY => nextpage=http://my_site.com/
FRAGMENT => #/entry
so it will redirect back to http://my_site.com/
because it probably ignores any fragment.
You should encode the value correctly, eg
window.location = 'https://third_party_site.com/?nextpage=' +
encodeURIComponent('http://my_site.com/#/entry')
which will produce nextpage=http%3A%2F%2Fmy_site.com%2F%23%2Fentry
👤Phil
Source:stackexchange.com