查看快取資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本指南說明如何使用 Chrome 開發人員工具檢查快取資料。
如果您要檢查 HTTP 快取資料,這不是所需指南。「Network Log」(網路記錄) 的「Size」(大小) 欄包含您要尋找的資訊。請參閱記錄網路活動一文。
查看快取資料
開啟開發人員工具 > 應用程式 > 儲存空間。
如要查看可用的快取,請展開
「Cache Storage」(快取儲存空間)。
![可用的快取。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/available-caches-edb1a6c17b196.png?authuser=2&hl=zh-tw)
按一下快取即可查看其中內容。
![檢視快取的內容。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/viewing-caches-contents-d8f5daa92cf44.png?authuser=2&hl=zh-tw)
按一下資源,在表格下方的區段中查看其 HTTP 標頭。
![查看資源的 HTTP 標頭。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/viewing-resources-http-7ab3484155b01.png?authuser=2&hl=zh-tw)
開啟「Preview」(預覽) 分頁標籤,查看資源內容。
![查看資源的內容。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/viewing-resources-conte-a63b79c240c.png?authuser=2&hl=zh-tw)
重新整理資源
- 查看快取的資料。
選取要重新整理的資源。開發人員工具會以藍色醒目顯示,表示已選取。
![選取資源。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/selecting-resource-2bbf13760e0af.png?authuser=2&hl=zh-tw)
按一下「重新整理」。
篩選資源
- 查看快取的資料。
- 使用「Filter by Path」文字方塊,篩除與提供路徑不相符的任何資源。
![篩除不符合指定路徑的資源。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/filtering-resources-do-60c3d293f759a.png?authuser=2&hl=zh-tw)
本範例會篩除路徑中不含 script
的資源。
刪除資源
- 查看快取的資料。
按一下要刪除的資源。開發人員工具會以藍色醒目顯示,表示已選取。
![選取要刪除的資源。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/selecting-resource-dele-fac7562b900ba.png?authuser=2&hl=zh-tw)
按一下「Delete Selected」圖示
。
刪除所有快取資料
- 依序開啟「應用程式」 >「儲存空間」。
在「快取」區段中,確認
「快取儲存空間」已啟用。
按一下「清除網站資料」。
![「快取儲存空間」核取方塊和「清除網站資料」按鈕。](https://developer.chrome.com/static/docs/devtools/storage/cache/image/the-cache-storage-checkbo-fc0e3720fd4a9.png?authuser=2&hl=zh-tw)
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2019-03-25 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]