Local server not reflecting updated files

瘦欲@ 提交于 2019-12-04 02:29:33

The browser might be caching your code and/or assets.

In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.

There's a option -c that refers to the cache time (max-age) in seconds [3600]

(e.g. -c10 for 10 seconds).

To disable caching, use http-server -c-1

You can see more information by enter http-server -h (for help)

You can disable cache in Chrome DevTools under "Network".

Whenever you reload a page while DevTools is open, it will clear the cache.

kinjal patel

You can try to use live-server instead. It works for me.

npm install live-server -g

And you can start it simply by the command live-server.

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