Visual Studio Development Server not updating css and javascript?

后端 未结 4 1176
悲哀的现实
悲哀的现实 2020-12-09 08:46

I\'ve recently returned to a web site project that has been on the backburner. Since recommencing work I\'ve noticed css and javascript changes aren\'t being recognised by

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 09:23

    The server may be sending headers to the browser that cause it to keep using cached copies. The simple way to test this is to empty your browser cache.

    If that fixes it, you need to study the HTTP headers you get from the server. The developer tools (a.k.a. F12 tools) in your browser of choice will expose the headers returned by the server. Then decide if you want to keep using these caching settings (good for speed) or change them (good for development).

    And how do you adjust these headers, you ask? It depends on the server. Here is a link to the instructions for common servers:

    • Apache
    • nginx
    • IIS

提交回复
热议问题