开发者

Javascript: Recreate window reference with parent or vice versa?

Is it possible somehow to keep reference with opened windows all the time, even after refresh or opening new tab and closing previous where windows were initially opened?

The only solution is to to create and keep register(track) of all open all windows. So basically it will cause to refresh content of all opened windows if same name were provided while opening it.

It's may be a solution if template is cached and messages are stored in localStorage but:

  • it's not cross browser solution
  • it's not a solution for COMET application at all as there will be connection开发者_运维知识库s opened from all windows instead of one(via parent window)

So is there any way to recreate or keep references of all opened windows?

Thanks ;)


Even if you keep track of the windows you opened (assuming you are using window.open which returns a handle to the window) you will only be able to refresh the opened window as long as it does not change to a domain that prohibits access due to cross site scripting limitations.

You could overcome some of this for some cases if you open documents that are on your own domain and have IFrames that show the actual content. so as long as nevigations occur within the Frame you can still access the opened window.

Eyal


Creating browser cookies may solve your problem


make use of cookies. and read the cookies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜