2013-03-14 25 views
-1

我已經寫了發送XHR員額擴展,但正在增加了兩個頭,我不想:停止Firefox向XMLHTTP Req添加雜注和緩存標頭?

Pragma: no-cache 
Cache-Control: no-cache 

我讀過,別人有這個問題已經在開發商關閉其緩存工具,但我不記得這樣做,並且我可以告訴緩存應該啓用。

什麼可能會添加這些?

回答

0

Firefox正在添加這些標頭。相關的代碼註釋是:在https://bugzilla.mozilla.org/show_bug.cgi?id=295074

+0

加入

// Bypass the network cache in cases where it makes no sense: // POST responses are always unique, and we provide no API that would // allow our consumers to specify a "cache key" to access old POST // responses, so they are not worth caching. 

該代碼謝謝。我沒有看到這些標題與從網頁形式發送的POST,但我想XHR的工作方式不同。 – user2089518 2013-03-15 10:22:42

+0

來自網頁表單的POST可以緩存:您可以使用緩存版本來查看「查看源代碼」和「保存頁面」等內容。 – 2013-03-15 12:55:15