我試圖在不丟失Firefox中的歷史記錄的情況下重定向。 我已經使用了下一沒有成功:JS:使用'window.location'重定向不在Firefox中保存歷史記錄
window.location = "http://example.com";
window.location.href = "http://example.com";
window.location.assign("http://example.com");
使用,而不是「窗口」「文件」也試過。
我重定向,但歷史不會從瀏覽器中添加(或刪除)
任何想法!?
注:
$.ajax({
type: "POST",
...
success: function (data) {},
});
可變數據包含了JS重定向功能(window.location.href = "http://example.com"
)
選定的答案,雖然很好的建議,並不能解決這個問題中提出的問題。這一個,然而http://stackoverflow.com/questions/864633/assigning-to-document-location-href-without-clobbering-history – numbers1311407 2011-09-12 22:59:05