如何使用JavaScript或Java清除浏览器(IE,Firefox,Opera,Chrome)历史记录,除了浏览器本身? [英] How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?

查看:222
本文介绍了如何使用JavaScript或Java清除浏览器(IE,Firefox,Opera,Chrome)历史记录,除了浏览器本身?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用JavaScript或Java清除浏览器(IE,Firefox,Opera,Chrome)历史记录,除非从浏览器本身清除它?

How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java, except clearing it from browser itself?

推荐答案

浏览器中的document.location数据通常是脚本无法访问的,因为允许访问可以让任何给定的站点访问您的整个浏览历史记录。最多可以进行一些简单的操作,例如转到历史记录条目#37或返回一页。但你不能做历史条目#23中页面的地址是什么。

The document.location data in browsers is generally inaccessible to scripts, because allowing access would give any given site access to your entire browsing history. At most you can do a few simple manipulations, like "go to history entry #37" or "go back one page". But you can't do "what was the address of the page in history entry #23".

大多数银行网站都会使用javascript链接来阻止点击历史记录建立。他们将使用document.location.replace来杀死最后一个历史条目(当前页面)并将其替换为新页面的地址。它实际上删除了返回选项以返回页面,因为之前的页面(就浏览历史而言)现在是新页面。

Most banking sites will use javascript links to prevent a click history from being built up. They'll do document.location.replace" to kill the last history entry (the current page) and replace it with the address of a new page. It in effect removes the "back" option to go back a page, because the previous page (as far as the browsing history is concerned) is now the new page.

这篇关于如何使用JavaScript或Java清除浏览器(IE,Firefox,Opera,Chrome)历史记录,除了浏览器本身?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆