Caching specific Javascript and CSS files

前端 未结 3 1227
一生所求
一生所求 2020-11-28 10:32

How can I cache a few specific JavaScript & CSS files. I found advice from this site to put this in my .htaccess file

AddOutputFilter DEFLAT         


        
3条回答
  •  没有蜡笔的小新
    2020-11-28 10:35

    That's cool i would anyways add a file revisions and make IIS cache css + js files. As Icarus specified.

    Then if you update the files on the server just add a new revision number this could also be a timestamp.

    • http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/
    • http://davidwalsh.name/prevent-cache (just the opposite)
    • http://betterexplained.com/articles/speed-up-your-javascript-load-time/
    • http://www.die.net/musings/page_load_time/
    • http://ajaxpatterns.org/Patterns#Performance_Optimisation

提交回复
热议问题