Any way to identify browser tab in JavaScript?

后端 未结 9 544
孤独总比滥情好
孤独总比滥情好 2020-11-27 05:17

I need to be able to identify what tab I am in within the browser. Isn\'t there some bit of information I can get from the browser to identify the tab? I don\'t need to kn

9条回答
  •  有刺的猬
    2020-11-27 05:39

    One of the possible solutions is using "window.name" property, but I do not want to use it because somebody else can use it.

    I found one more possible solution: using sessionStorage. It supported by FF3.5+, Chrome4+, Safari4+, Opera10.5+, and IE8+.

提交回复
热议问题