Prevent scripts from being cached programmatically

后端 未结 6 1300
面向向阳花
面向向阳花 2021-01-23 16:23

I would like to ask if there is a way to prevent Firefox from caching scripts (.js files).

I have a project (ASP.Net Web App) with caching issue on firefox. When I first

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-23 17:06

    One technique is to add a random element to the URL as a querystring, so the browser doesn't know how to cache the script:

    
    
                                     
                  
提交回复
热议问题