<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>瀏覽器 on 小M平碎碎念</title>
    <link>https://www.lilmp.com/tags/%E7%80%8F%E8%A6%BD%E5%99%A8/</link>
    <description>Recent content in 瀏覽器 on 小M平碎碎念</description>
    <image>
      <url>https://www.lilmp.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://www.lilmp.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 21 Jun 2022 08:03:11 +0800</lastBuildDate><atom:link href="https://www.lilmp.com/tags/%E7%80%8F%E8%A6%BD%E5%99%A8/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>清除瀏覽器快取 status 301</title>
      <link>https://www.lilmp.com/2022-06-21/%E6%B8%85%E9%99%A4%E7%80%8F%E8%A6%BD%E5%99%A8%E5%BF%AB%E5%8F%96-status-301/</link>
      <pubDate>Tue, 21 Jun 2022 08:03:11 +0800</pubDate>
      
      <guid>https://www.lilmp.com/2022-06-21/%E6%B8%85%E9%99%A4%E7%80%8F%E8%A6%BD%E5%99%A8%E5%BF%AB%E5%8F%96-status-301/</guid>
      <description>怎麼重新整理都沒用？這篇教你清除永無止盡的瀏覽器重新轉址(redirection)！</description>
      <content:encoded><![CDATA[<h2 id="事情緣起">事情緣起</h2>
<p>前幾天<a href="" >設定godaddy網域</a>
，以及<a href="" >測試各種轉址服務</a>
後，發現原本設定把<code>lilmp.github.io</code>和<code>lilmp.com</code>綁定在一起，可是<strong>取消後瀏覽器卻怎麼樣都會自動轉址</strong>（不過只要更換為<code>無痕視窗</code>或<code>用其他帳號登入</code>瀏覽器就又一切正常），簡直像鬼打牆一樣！！超奇怪的！！</p>
<p>直到查到<a href="https://dev.to/epranka/clear-the-301-302-redirection-cache-chrome-4dio" target="_blank" >這篇</a>
才解決我的問題!</p>
<h3 id="問題排查">問題排查</h3>
<ol>
<li>
<p>確認已在github取消custom domain(卻還是會自動轉址)
<figure>
       <img loading="lazy" src="/clear-301-redirection-cache-chrome/github-disable-domain.jpg" width="100%"/> <figcaption>
               已於github中取消轉址綁定
           </figcaption>
   </figure>
</p>
</li>
<li>
<p>確認已在godaddy中將<code>lilmp.com網域</code>與其他網域連結。(沒用)
<figure>
       <img loading="lazy" src="/clear-301-redirection-cache-chrome/godaddy-screenshot.jpg" width="100%"/> <figcaption>
               已於godaddy中綁定其他網域
           </figcaption>
   </figure>
</p>
</li>
<li>
<p>有想過可能是快取cookie問題，也於<code>chrome</code>設定中刪除<code>github</code>、<code>godaddy</code>相關cookie快取。(still no luck)
<figure>
       <img loading="lazy" src="/clear-301-redirection-cache-chrome/chrome-cookie.jpg" width="100%"/> <figcaption>
               於chrome中刪除快取
           </figcaption>
   </figure>
</p>
</li>
<li>
<p>查到<a href="https://blog.vvtitan.com/2014/08/%E7%80%8F%E8%A6%BD%E5%99%A8%EF%BC%9Af5%E3%80%81ctrlf5%E5%92%8C%E4%BD%8D%E5%9D%80%E6%AC%84%E8%BC%B8%E5%85%A5%E7%9A%84%E5%8D%80%E5%88%A5/" target="_blank" >一篇文章</a>
說可以使用<code>ctrl</code>+<code>f5</code>強迫瀏覽器再抓一次瀏覽器資料。（仍然沒有用）</p>
</li>
</ol>
<h3 id="發現問題">發現問題</h3>
<blockquote>
<p><strong>原來問題出現在 request url 時的 status code！</strong></p>
</blockquote>
<p>打開<code>devtools</code>-&gt;<code>netwok</code>頁籤，檢查<code>header</code>可以發現 <code>301(from disk cache)</code> 的黃燈。
<figure>
    <img loading="lazy" src="/clear-301-redirection-cache-chrome/devtool-screenshot.jpg" height="50%"/> <figcaption>
            status 301(from disk cache)
        </figcaption>
</figure>
</p>
<p>如果你也遇到一樣的問題，可以參考以下的解決辦法。</p>
<h3 id="解決問題">解決問題</h3>
<p>針對不希望轉址網域(ex: lilmp.github.io)點右鍵，執行<code>clear browser cache</code>，如此便會真正刪除原本的快取，重新整理後就不會再鬼打牆自動轉址囉！</p>
<figure>
    <img loading="lazy" src="/clear-301-redirection-cache-chrome/clear-browser-cache.jpg" height="50%"/> <figcaption>
            clear browser cache
        </figcaption>
</figure>

<h3 id="文中參考連結列表">文中參考連結列表</h3>
<ol>
<li><a href="https://dev.to/epranka/clear-the-301-302-redirection-cache-chrome-4dio" target="_blank" >https://dev.to/epranka/clear-the-301-302-redirection-cache-chrome-4dio</a>
 (最終解法)</li>
<li><a href="https://blog.vvtitan.com/2014/08/%E7%80%8F%E8%A6%BD%E5%99%A8%EF%BC%9Af5%E3%80%81ctrlf5%E5%92%8C%E4%BD%8D%E5%9D%80%E6%AC%84%E8%BC%B8%E5%85%A5%E7%9A%84%E5%8D%80%E5%88%A5/" target="_blank" >https://blog.vvtitan.com/2014/08/%E7%80%8F%E8%A6%BD%E5%99%A8%EF%BC%9Af5%E3%80%81ctrlf5%E5%92%8C%E4%BD%8D%E5%9D%80%E6%AC%84%E8%BC%B8%E5%85%A5%E7%9A%84%E5%8D%80%E5%88%A5/</a>
</li>
</ol>
<hr>
<p>謝謝看到這裡的你/妳，希望這篇文章有幫助，任何問題或回饋都很歡迎喔！❤️</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
