I start a popup with window.open("link","name"). I don't have control on the popup.开发者_开发知识库
The popup it's then redirecting to another link.
How can I get the final link of the popup ? The final link it's on another domain.
with popup_window_object.location.href I can set the link but I can't get it.
Thank you.
The same-origin policy makes this impossible for privacy reasons. It would work if the final URL had the same hostname and port number as the page trying to get it, but since this is not the case, the code generates a security error.
You can't read a location from another domain because of security restrictions. If the first content in the popup is your page, you can push a next popup's location into a variable of a parent window.
加载中,请稍侯......
精彩评论