0 Replies Latest reply on Feb 16, 2009 5:56 PM by John Newman

    Caching strategy for css and js files?

    John Newman Newbie

      Hello,

      We want to have clients be able to cache any static content (css, javascript etc.) However after a release the files may change and the client's will still be holding the invalid cached copy. I'm sure many of us have ran into that after an updated release..

      The best solution is to append the build number to the files, then after release, the file name is different and the client requests the new file. I'd like to go this route, but getting that cleanly tied into the build may not be so clean. We are using maven2 and the release plugin, if anyone has this all wired in please share!!

      Apart from that, are there any options besides setting the expires header to 24 hours?

      And is there any better way to set the expires header other than a servlet filter mapped for *.css?

      We do have IIS sitting infront of jboss, is there a way for IIS to serve *.css but still have the css files inside the ear and not somewhere in wwwroot? (i don't think so..)

      So if you have any tips, links, or strategies for handling cache within jboss, please post.

      Thanks