开发者

Fetching all the urls opened in the browser

I know that getRequestURL will fetch me the URL of the page being opened.

I need to know how to get the URLs of all the tabs opened in the browser say firefox.

Is there anyway to achieve th开发者_如何学Cis?


This is not possible to do from a regular web page as it would be a serious security issue.

However, it is possible with browser extensions (for example, in Chrome there is a chrome.tabs.getAllInWindow() function available to plugins, and accessing their urls is simply a matter of looping through the tabs returned by that function and reading the .url property. See further documentation here).


From your own web page you should not be able to achieve this, as that would be a breach of the sandboxing these browsers attempt to enforce between tabs. If you launched the other windows via javascript, you may be able to control their content, but only under this circumstance.

You could feasibly write a plugin to run in the browser, but obviously the client would have to install/trust this for it to work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜