Google chrome css doesn't update unless clear cache

后端 未结 8 1942
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 23:48

I\'m trying to work in my local server but I have to clear my cache every time if I want to see changes on the css rules.

There is any way to control Google Chrome c

8条回答
  •  既然无缘
    2020-12-13 00:18

    Following this solution here helped me reloading the css : https://wpreset.com/force-reload-cached-css/

    Instead of requesting the file doing the following :

    
    

    Request id by adding a parameter (the name of the parameter doesn't matter) at the end of the file :

    
    

    This will request the new css file. Whenever you make a change to your css file, you just have to change either the parameter name, value or both and the server will request it again.

    This is very useful when you have no control over the browsers of your clients and it requests no action on their part.

提交回复
热议问题