浏览器插件/工具栏是否可以识别 iFrame 的当前 URL?

发布于 2024-08-07 07:29:14 字数 286 浏览 2 评论 0原文

我的网站构建了 DiggBar 和 Facebook 共享栏等内容。

如果用户想要突破框架内容,直接访问底层站点,我们无法保证当前页面会被显示,因为 JS 或 HTML 无法查询 iFrame 的当前 URL(出于安全原因) )。

我们所能做的就是显示最初在 iFrame 中加载的页面。

问题是:如果我们将该服务设置为工具栏或插件,我们是否能够查询给定的网页并确定每个 iFrame 的当前 URL?这样,如果用户点击iFrame中的不同页面,然后决定突破,就可以保证显示正确的页面。

谢谢!

My site frames content like DiggBar and the Facebook share bar.

If a user wants to break out of the framed content, and visit the underlying site directly, we cannot guarantee the current page will be displayed, since there is no way for JS or HTML to query the current URL of an iFrame (for security reasons).

All we can do is show the page originally loaded in the iFrame.

The question: if we set up the service as a toolbar or plug-in, could we then have the capability to query a given web page and ascertain the current URL for each iFrame? This way, if a user clicks to different pages in the iFrame, then decides to break out, we can guarantee displaying the correct page.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甚是思念 2024-08-14 07:29:14

如果您决定走出 JS/DHTML 界限,您将获得更多的力量和能力。
在您决定支持的每个浏览器(IE、FF 等)中应该有一种方法可以做到这一点。尽管需要安装软件可能会付出一定的代价。

if you decide to step out of the JS/DHTML boundaries, you get more power and capabilities.
There should be a way to do so in each browser you decide to support (IE, FF, etc.). Though there would be the price one might pay for requiring a software installation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文