Website won't update in browser without Ctrl + F5

为君一笑 提交于 2019-12-08 14:20:08

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!