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 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题