通过 javascript 从浏览器历史记录中删除 URL

removing a URL from browser history through javascript

我们正在将我们的网站从 http 迁移到 https。当您转到地址栏并开始输入 "my_s..." 时,浏览器会建议“http://my_site.com". I've got it set up to redirect, but I'd rather not have the user go through that step. Is there any way to get the browser to forget "http://my_site.com" or get it to prefer "https://my_site.com”?

一个复杂的问题是我正在使用 appcache,因为我们支持离线模式,而且我们也有一些在后台发生的自动 ajax 调用。

此保存的数据由浏览器处理。您必须让用户删除浏览器历史记录,或设置从 http 到 https

的重定向