Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Listen to URL change in opened window

If I open a window (with window.open), can I detect when its URL changes (to a specific one), given that:

  • The initial URL for the window is on another domain (Facebook, to be precise)
  • The URL I'm interested in detecting is too

I need this for authentication. See "Desktop apps" at the bottom of this page.

like image 971
Bart van Heukelom Avatar asked May 02 '11 21:05

Bart van Heukelom


1 Answers

As long as the new url resides on a domain not considered equal to your own by the Same Origin Policy, then this will impossible.

like image 194
Sean Kinsey Avatar answered Nov 14 '22 08:11

Sean Kinsey