如何使用 php 或 javascript 获取所有浏览器中当前打开的选项卡的 url?

How to get the url of currently opened tabs in all browsers with php or javascript?(如何使用 php 或 javascript 获取所有浏览器中当前打开的选项卡的 url?)
本文介绍了如何使用 php 或 javascript 获取所有浏览器中当前打开的选项卡的 url?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人可以指导一下或对如何使它成为可能知之甚少,请告诉我.

If anyone can guide a bit or have little knowledge how to make it possible, please let me know.

谢谢

推荐答案

您不能,此信息无法通过任何标准界面获得(除了您已经参考的窗口).你可以看到为什么.您不希望您的一个标签的网站所有者能够知道您所有其他标签的显示内容,这将大量侵犯您的隐私.

You can't, this information is just not available via any standard interface (except for a window you already have a reference to). You can see why. You wouldn't want the site owner for one of your tabs to be able to know what all your other tabs were showing, that would be a massive invasion of your privacy.

对于您已经引用的窗口,您可以获取该窗口正在显示的任何内容的 URL (window.location.href),也可能是其父窗口的 URL (window.parent.location.href)、顶级 (window.top.location.href) 和下级框架 (window.frames[n].location.href — 我想).但这不会让你得到你要求的标签.

For windows you already have a reference to, you can get the URL of whatever that window is showing (window.location.href), and possibly that of its parent window (window.parent.location.href), top-level (window.top.location.href), and subordinate frames (window.frames[n].location.href — I think). But that's not going to get you the tabs you asked for.

此信息可能通过各种浏览器的扩展机制(Firefox 插件、Chrome 扩展等)获得,但这仅适用于需要用户显式安装的浏览器扩展,并且(目前) 需要为每个浏览器供应商编写一个,并非所有供应商都提供扩展机制.

This information is likely available via the extension mechanism of various browsers (Firefox add-ins, Chrome Extensions, etc.), but that would be only for a browser extension, which requires an explicit install from the user, and (currently) requires writing one for each browser vendor, where not all vendors offer an extension mechanism.

另外:此信息肯定不会发送到服务器端(您标记了您的问题 php).

Separately: This information is certainly not sent server-side (you tagged your question php).

这篇关于如何使用 php 或 javascript 获取所有浏览器中当前打开的选项卡的 url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)