如何關閉瀏覽器的HSTS功能

 在安裝配置 SSL 證書時,可使用一種能使數據傳輸更加安全的Web安全協議,即在服務器端上開啓 HSTS (HTTP Strict Transport Security)。它告訴瀏覽器只能經過HTTPS訪問,而絕對禁止HTTP方式。 web

HTTP Strict Transport Security (HSTS) is an opt-in security enhancement that is specified by a web application through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. It also prevents HTTPS click through prompts on browsers.chrome

可是,在平常開發的過程當中,有時咱們會想測試頁面在 HTTP 鏈接中的表現狀況,這時 HSTS 的存在會讓調試不能方便的進行下去。並且因爲 HSTS 並非像 cookie 同樣存放在瀏覽器緩存裏,簡單的清空瀏覽器緩存操做並無什麼效果,頁面依然經過 HTTPS 的方式傳輸。 那麼怎樣才能關閉瀏覽器的 HSTS 呢,各類谷歌瀏覽器

度娘

以後,在這裏彙總一下幾大常見瀏覽器 HSTS 的關閉方法。緩存

Safari 瀏覽器

  1. 徹底關閉 Safari
  2. 刪除 ~/Library/Cookies/HSTS.plist 這個文件
  3. 從新打開 Safari 便可
  4. 極少數狀況下,須要重啓系統

Chrome 瀏覽器

  1. 地址欄中輸入 chrome://net-internals/#hsts
  2. Delete domain 中輸入項目的域名,並 Delete 刪除
  3. 能夠在 Query domain 測試是否刪除成功

Opera 瀏覽器

和 Chrome 方法同樣安全

Firefox 瀏覽器

  1. 關閉全部已打開的頁面
  2. 清空歷史記錄和緩存
  3. 地址欄輸入 about:permissions
  4. 搜索項目域名,並點擊 Forget About This Site

內容轉自:http://www.tuicool.com/articles/QbYBne服務器

相關文章
相關標籤/搜索