问题
I'm running a basic website with just HTML and CSS. Whenever I push new files to the website, the new files won't show up in the browser until I do a CTRL + F5 (hard refresh). Can anybody help me with this?
回答1:
Most likely, your browser is caching the content of your website when you visit it. The next time you visit, it will show the local, cached copy (unless you "hard-refresh" it).
Check if you have any cache-related meta tags in your pages, and see if using a no-cache tag would help.
回答2:
You must put this in your head section :
<meta content="no-cache" />
回答3:
If you are doing this for dev purposes I would consider a tool like live reload which will update your browser as you update your files. http://livereload.com/
来源:https://stackoverflow.com/questions/10270201/website-wont-update-in-browser-without-ctrl-f5