Cache-Control: no-cache,Cac…

Cache-Control: no-cache:這個很容易讓人產生誤解,使人誤以爲是響應不被緩存。實際上Cache-Control: no-cache是會被緩存的,只不過每次在向客戶端(瀏覽器)提供響應數據時,緩存都要向服務器評估緩存響應的有效性。

 

Cache-Control: no-store:這個纔是響應不被緩存的意思。

 

Pragma: no-cache:跟Cache-Control: no-cache相同,Pragma: no-cache兼容http 1.0 ,Cache-Control: no-cache是http 1.1提供的。因此,Pragma: no-cache可以應用到http 1.0 和http 1.1,而Cache-Control: no-cache只能應用於http 1.1.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章