顯示具有 Developer Tools 標籤的文章。 顯示所有文章
顯示具有 Developer Tools 標籤的文章。 顯示所有文章

2014年1月23日 星期四

Chrome 清除快取並強制重新載入

當 Ctrl + F5 或是 Ctrl + Shift +R 沒有用的時候,你可以試試這個!

今天同事分享的,原來很早就有這個功能 "清除快取並強制重新載入" ,我一直都只會用快捷鍵...

1. 按下F12
2. 長壓重新整理按鈕
3. 點擊最後一個  "清除快取並強制重新載入"




我用英文版來介紹



"Normal reload" 正常重新載入

The same thing as pressing f5. This will use the cache in every way possible. If the browser can avoid re-downloading JavaScript files, images, text files, etc. then it will.

跟 F5 "重新整理"是相同的,會使用 Cache 資料,JS檔案、圖片、txt檔案都會重複使用。


"Hard reload" 強制重新載入

Don't use anything in the cache when making the request. Force the browser do re-download every JavaScript file, image, text file, etc.

跟我們平常使用的 Ctrl + F5 是一樣的,不使用 Cache 資料,重新載入所有的檔案。


"Empty Cache and Hard Reload" 清除快取並強制重新載入

Obviously if the cache is empty then it will have to do a hard reload. This will again force the browser to re-download everything. However, if the page makes any after-the-fact downloads via JavaScript that weren't part of page load, then these might still use the cache, which is where emptying the cache helps because it makes sure that even these won't use cached files.

跟上面 "強制重新載入" 一樣不使用 Cache 資料,也會重新載入所有的檔案,但多做的一件事就是把先所有的 Cache 資料刪除後再載入。

2013年11月19日 星期二

Chrome Developer Tools - Settings > Overrides > Emulation 模擬瀏覽器 改的更好用了!

現在開發網站常常需要測試在不同裝置上不同瀏覽器的長相
我一直都很依賴 Chrome Developer Tools > Settings > Overrides  > Emulation (模擬 User Agent 的功能)

目前正式板的 Chrome



現在的位置在





讓我們來看看 Chrome Canary 測試板裡面的改變
我第一次找的時候花了點時間,跟大家分享一下



Settings 的位置換了,不在右下角




打開 Overrides 會告訴你 Emulation (模擬功能) 已經換到 Console 的 Drawer 當中




勾起來後,關掉 Settings 點開齒輪旁邊的這個符號,也就是 Drawer 的位置




 你會看到正下方出現了三個 tab




點到 Emulation Tab 就可以看到嶄新的 User Agent 功能了!



支援的種類更多了,甚至支援到最新的 Nexus 5 了呢!