I have a personal Java-backed website I'm building with Tomcat, and I've run into an annoyance. After making some changes to a stylesheet, when accessing the website from a browser I was getting the old version of the css file. I assumed it was just the browser (Firefox) that was caching the file, but I've tried clearing the browser's cache and it has not helped. If I look at the file on the server or type the url of the css file in my browser, I see the updated version, but when examining it through Firebug I see the old version (and by looking at the rendered page it is obvious that it is using the old version). To rule out Firebug I have tried turning it off and closing/reopening Firefox and loading the page again, but that has not helped. Especially strange is that I tried changing the name of the css file (and obviously also changing link tag on the page as well) but this has not helped. At this point I am wondering if Tomcat's servlet container stores compiled JSPs somewhere, and if that is true perhaps it is storing linked stylesheets as well.
To put it even more bluntly, Tomcat doesn't cache, period.
Is there maybe a caching proxy server between the client and Tomcat?
A trick that I use to get updated cache and CSS in Firefox is to instruct the browser to fetch the updated file directly. That is, I type the updated file's URL directly into the navigation bar so that it displays in a web page all its own. Sometimes I have to give it an extra kick by pressing the Refresh button (F5) once it's loaded to force an update, but that usually works. I can then generally go back and request the page that references the updated resource and expect it to work.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 29, 2010
I apologize for the late response. It turns out there was some malformed CSS that apparently Firefox was simply ignoring. I'm no expert on this, but I'm assuming CSS files must be stored somewhere on the DOM, and if that's the case, Firefox wasn't putting the malformed CSS on the DOM. That would explain why I was seeing the new CSS entries when putting in the full URL to the stylesheet in the address bar. Thank you both for your responses and advice.