Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bad cache handling with IE5 1

Status
Not open for further replies.

manu0

Programmer
Apr 28, 2001
54

hello

i have a little problem with IE 5.0x,

when the cache policy in the internet options is set to 'automatically', IE 5 does not get jsp pages from the server if those pages are already in the browser cache... so i should press the reload button to get the most recent page...

even if I use http header options :

Pragma = no-cache
Cache-Control = no-cache
Expires = 0

this is a known bug of IE 5 but is there a trick about that ?
 
Hi,
How do i get the related values into a text area(from data) when i select from select list which are also coming from data base to select list.
 
i think your problem is with tomcat itself. jsp works in a slightly different way to other server side scripting languages in that the jsp page is actually compiled into a servlet the first time it is run. this makes it efficient when compared to say asp which does all the processing each time the page is accessed by a client, whereas jsp has the compiled servlet to use.

i originally thought you changed this setting in the tomcat/conf/server.xml file. however here is the way that it is done by alex from jguru:


i think this is your problem...sorry if im way off track :) and the circus leaves town...
 

hi Kyuss,

thanks for your reply, but in fact I am not using Tomcat :)
, I use ServletExcec...

what you said is ok, but you can experience the same bug as me :

1. build a very simple jsp file
2. open it with IE5
3. make a change to your page
4. type the same url in the browser (but don't use the 'refresh' or 'back' buttons), just type the url and press 'enter'

you'll see the old page and not the new (you should use the refresh button to have the new page!)


manu0
 
oops! sorry, terrible of me to ASSUME you were using tomcat! its not like there is a tomcat monoploly or anything :)

you are right...if i type the url and dont use refresh, it doesnt even go to check the page on the server...

hopefully somebody else can come up with the answer coz i have NO IDEA! and the circus leaves town...
 
hi

I have read the solution in a book :

should add the following code at top of each JSP file :

<%
response.addHeader(&quot;Pragma&quot;,&quot;no-cache&quot;);
response.addHeader(&quot;Cache-Control&quot;,&quot;no-cache&quot;);
response.addHeader(&quot;Expires&quot;,&quot;1&quot;);
%>

it works... :)

I tried to set the headers in a servlet but it don't works...

manu0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top