防止 URL 被存储到浏览器历史记录中

发布于 2024-09-24 06:50:59 字数 369 浏览 1 评论 0原文

我需要打开一个带有某些参数的 url 的弹出窗口。这些参数包含我希望防止在浏览器历史记录中显示的信息。该 url 指向第 3 方站点,我无法影响这些参数传输给它们的方式(例如不能使用 POST)。

目前我已经解决了这个问题,以便我的服务器上有一个页面可以将第三方页面的内容加载到 iframe,这似乎可行。

但是,我想知道是否还有其他方法可以做到这一点,它们是否可能更好或更糟? JavaScript 还是什么? iframe 的缺点是它不符合 XHTML Strict 标准,而这正是我们的目标。

这里还有其他类似的问题,但我找不到好的答案。

编辑:显然这在 IE 中不能按预期工作。可能出于其他原因我仍然保留该解决方案,但很高兴知道是否有“防弹”解决方案。

I need to open a popup window to a url with certain parameters. The parameters contain information that I would like to prevent from showing up in the browser history. The url points to a 3rd party site and I can't affect the way those parameters are transferred to them (can't use POST for example).

Currently I have worked around this so that I have a page on our server that loads the content of the third party page to an iframe and this seems to work.

However, I was wondering if there are any other ways of doing this and are they maybe somehow better or worse? Javascript or something? The negative side of this iframe thing is that it is not XHTML Strict compliant, which is something we are aiming for.

There are other similar questions here but I couldn't find a good answer.

Edit: Apparently this does not work as expected in IE. It might be that I still keep the solution for another reason, but it would be nice to know if there is a "bulletproof" solution.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文