火狐浏览器不重新加载更新CSS / JS文件 [英] Firefox browser does not reload the update CSS/JS files

查看:705
本文介绍了火狐浏览器不重新加载更新CSS / JS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在Firefox浏览器的一个问题,因为每次更新我的CSS或JS文件,我需要清除我的Firefox浏览器以获得更新的文件的缓存。我使用XSP2服务器,因为我使用C#和asp.net在Ubuntu开发的web应用程序我

I'm having a problem in the firefox browser, because everytime I update my CSS or JS files, I need to clear the cache of my firefox browser to get the updated files. I'm using XSP2 server because I developed my webapp using C# and asp.net in ubuntu.

请问有什么办法可以自动重新加载在Firefox浏览器更新的CSS / JS文件,并在服务器端或在我的webapps实施?

Is there any way to automatically reload the updated CSS/JS files in the firefox browser and implemented in server-side or in my webapps?

请指教。

非常感谢。

推荐答案

您可以乱用头的缓存,但这样做的时候,你希望他们改变可以简单地通过查询字符串追加更新的元素的最简单的事情..

You could mess with the cache of the headers, but the easiest thing to do is simply append your updated elements with a querystring when you want them to change...

我知道这听起​​来并不像一个很好的解决方案,但是当你开始缩小文件,结合你的JS和CSS文件,出于性能的考虑,大部分的解决方案将改变URL时,他们还是改变来获得这些资源?

I know this doesn't sound like a good solution, but when you begin minifying and combining your js and css files for performance reasons, most of the solutions will change the url to get these resources when they change anyway...

这篇关于火狐浏览器不重新加载更新CSS / JS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆