I uploaded my web application already in my Production Tomcat Web Server.
I am trying to test it already and it works fine on FF/IE7/IE8 but I am having a problem
on display on IE6.
I notice in the status bar that IE6 seems to be downloading the images every now and then.
Even though I did not click anything, it still downloads the images.
I am using a menu that uses images and it does not display well on IE6. Problem is that 60% of my targeted user
runs on this browser.
I am beginning to think that this is a browser cache problem. In all my JSP, I place below meta tag in all the head section.
I did this because my apps relies heavily on Ajax and I need the latest copy of my web resource.
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">
</head>
Could this be the culprit and is there any workaround for this? How can I force IE6 to cache those images? Thanks.
I am not exactly sure if this is what you are looking for but kindly advise if I miss anything.
This is an example of an Image being downloaded. I forgot to mention that this apps runs only on our local intranet web site.
@Pekka, Is this what you are looking for?
Response Headers
Server Apache-Coyote/1.1
Etag W/"1957-1275442082000"
Date Mon, 18 Oct 2010 11:37:00 GMT
Request Headers
Host atpapps03:9090
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729)
Accept image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Connection keep-alive
Referer http://atpapps03:9090/rts/css/menu.css
Cookie JSESSIONID=0DD210EE0B2788A7774B10D477734DA9
If-Modified-Since Wed, 02 Jun 2010 01:28:02 GMT
If-None-Match W/"1957-1275442082000"
Cache-Control max-age=0
There are two problems:
The meta tags are ignored by the webbrowser. Put this information in the response header.
Even when it wasn’t ignored, the meta rules would only apply on the HTML output of the JSP and thus not on all linked resources (img, js, css, etc) inside the HTML output. They have each their own rules in their own response header.
Your best bet is using a
Filterwhich adds theExpiresheader on a far-future date on static content.Map this filter in
web.xmlon anurl-patterncovering the URL of interest, e.g./images/*.