[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Caching strategy for css and js files?

johnNewman do-not-reply at jboss.com
Mon Feb 16 17:56:48 EST 2009


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.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210542#4210542

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210542

More information about the jboss-user mailing list