CSS is not being applied after changes

后端 未结 5 768
悲&欢浪女
悲&欢浪女 2020-12-23 20:39

I have problem where I can\'t apply the style in CSS in my ASP.NET MVC application. The behavior is it applies for the first time and then the subsequent changes to the CSS

5条回答
  •  隐瞒了意图╮
    2020-12-23 21:22

    This will work when anything else won't, like in my case:

    Credit goes to: atticae

    You can append a random query parameter to the stylesheet url (for example via javascript or server side code). It will not change the css file that is being loaded, but it will prevent caching, because the browser detects a different url and will not load the cached stylesheet.

    
    

提交回复
热议问题