douyouqian8550 2011-07-01 21:19
浏览 246

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

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

Thanks

  • 写回答

3条回答 默认 最新

  • douzhongju8780 2011-07-01 21:24
    关注

    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.

    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.

    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.

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

    评论

报告相同问题?

悬赏问题

  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛