You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Prashanth Pushpagiri <pr...@yahoo.com> on 2003/03/07 18:31:27 UTC

[OT] Caching problems with IE after download

Hi everyone:

This is more related to Java than tomcat i guess! But
any input would be greatly appreciated. This is a
question that has been around for a while now...I
tried looking up the forums on Sun's website...but
could not really find a solution to solve my
problem...so here goes...

I have implemented a file download bean which sends
out binary data to the browser. The bean is
instantiated by a JSP page. To make sure browsers
don't cache response I do:

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);

while sending out the file and on every other JSP page
on the site. However, for some reason the JSP page
accessed immediately after downloading a file contains
portions of a binary stream on the top of the page
followed by HTML. I am confident the server is not
resending the data again...(confirmed it with ethereal
and nescape works too)...so I dont know what I am
doing wrong...or what I should do to get it
right...Any suggestions ot opinions on this?

Note that the headers work perfectly fine while
navigating through JSP pages.

Thanks
Prashanth

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: [OT] Caching problems with IE after download

Posted by Jake Robb <ja...@mac.com>.
Seems to me that the problem is with the means you are using to send us the
file.  Can you show us that code?

-Jake

----- Original Message -----
From: "Prashanth Pushpagiri" <pr...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, March 07, 2003 12:31 PM
Subject: [OT] Caching problems with IE after download


> Hi everyone:
>
> This is more related to Java than tomcat i guess! But
> any input would be greatly appreciated. This is a
> question that has been around for a while now...I
> tried looking up the forums on Sun's website...but
> could not really find a solution to solve my
> problem...so here goes...
>
> I have implemented a file download bean which sends
> out binary data to the browser. The bean is
> instantiated by a JSP page. To make sure browsers
> don't cache response I do:
>
> response.setHeader("Cache-Control", "no-cache");
> response.setHeader("Pragma", "no-cache");
> response.setDateHeader("max-age", 0);
> response.setDateHeader("Expires", 0);
>
> while sending out the file and on every other JSP page
> on the site. However, for some reason the JSP page
> accessed immediately after downloading a file contains
> portions of a binary stream on the top of the page
> followed by HTML. I am confident the server is not
> resending the data again...(confirmed it with ethereal
> and nescape works too)...so I dont know what I am
> doing wrong...or what I should do to get it
> right...Any suggestions ot opinions on this?
>
> Note that the headers work perfectly fine while
> navigating through JSP pages.
>
> Thanks
> Prashanth
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: [OT] Caching problems with IE after download

Posted by George Sexton <gs...@mhsoftware.com>.
Look for redirects that don't have a return immediately after them.

-----Original Message-----
From: Prashanth Pushpagiri [mailto:prash_mail_lists@yahoo.com]
Sent: Friday, March 07, 2003 10:31 AM
To: Tomcat Users List
Subject: [OT] Caching problems with IE after download


Hi everyone:

This is more related to Java than tomcat i guess! But
any input would be greatly appreciated. This is a
question that has been around for a while now...I
tried looking up the forums on Sun's website...but
could not really find a solution to solve my
problem...so here goes...

I have implemented a file download bean which sends
out binary data to the browser. The bean is
instantiated by a JSP page. To make sure browsers
don't cache response I do:

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);

while sending out the file and on every other JSP page
on the site. However, for some reason the JSP page
accessed immediately after downloading a file contains
portions of a binary stream on the top of the page
followed by HTML. I am confident the server is not
resending the data again...(confirmed it with ethereal
and nescape works too)...so I dont know what I am
doing wrong...or what I should do to get it
right...Any suggestions ot opinions on this?

Note that the headers work perfectly fine while
navigating through JSP pages.

Thanks
Prashanth

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org