問題描述
我一直在使用 XAMPP 連接到 localhost 以在我的計算機上為網站進行編輯.我已經使用它一年多了,過去每當我更新本地文件時,我都可以在瀏覽器上刷新頁面,它會立即更新.現在,即使圖像文件已更改,我也無法更新它.
I have been using XAMPP to connect to localhost to do editing on my computer for websites. I have been using it for over a year now and in the past whenever I would update the local file, I could refresh the page on my browser and it would immediately update. Now, I can't get it to update even if, for example, an image file has changed.
我想知道這是否是 cookie 的問題(我過去沒有遇到過).發生這種情況有共同的原因嗎?我在搜索中找不到任何東西.感謝您的幫助!
I'm wondering if it's an issue with cookies (which I haven't had in the past). Is there a common reason that this happens? I couldn't find anything upon a search. Thanks for the help!
推薦答案
首先要嘗試的是清除瀏覽器歷史記錄/緩存并重新加載瀏覽器.
First thing to try would be clearing browser history/cache and reloading the browser.
如果您啟用了某種緩存也可以解釋它.
If you enabled some kind of caching that might also explain it.
您可以通過在本地主機上創建一個 new 頁面進行測試,看看它是否有效.如果是這樣,請檢查您在 localhost 上更改的任何頁面是否實際正在更新(檢查文件修改時間并關閉/重新加載源以查看更改是否確實存在).
You could test by creating a new page on localhost and see if it works. If so, then check that any pages you're changing on localhost are actually being updated (check the file modified times and close/reload the source to see if the changes are actually there).
這篇關于localhost 不會立即更新的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!