Forums Register Login

Cache Control

+Pie Number of slices to send: Send
Hello all,
I have problem here. I am using jsp in my project.My problem is i shouldn't allow the user to navigate back.when he clicks the back button in the browser, he should get WARNING AGE EXPIRY message.So how to go about this.I used the following lines of code
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
It did not work.What do i need to do.Do i need to set some properties in the web server?
I am using tomcat3.2 version.
Thanx in advance
Kiran
[ January 16, 2004: Message edited by: Mark Spritzler ]
+Pie Number of slices to send: Send
There is no sure fire way of handling this, I usually use

But there was also a suggestion in a previous thread that suggested that it might be possible to open a new browser window and make sure the previous window closes itself. I'd call that a bit yucky but it does solve the problem.
Dave.
+Pie Number of slices to send: Send
 

Originally posted by David O'Meara:
There is no sure fire way of handling this, I usually use


This may work for pages that are getting served by your servlet. But what about static pages that are in fact getting served by the DefaultServlet. How do I make them un-cacheable. My problem is I have a page with many links to static resources say .mp3 files that I do not wanna cache... And I want to handle this at the server side(I have gone through the options available at the client side but feel would be better if this is handled at the server). How do I do this.. Is there some kinda management console where I can say "DO not cache my *.mp3 files" and the server i.e. DefaultServlet would add the respective headers whenever it serves an .mp3 file for me?? Or is there any other way out....
Regards
+Pie Number of slices to send: Send
Kiran. I removed the "Urgent" in your topic title. This way you can get more responses. Usually people skip over posts that say urgent.
Mark
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4237 times.
Similar Threads
JSP not getting refreshed in Mozilla Firefox
How to control Caching in JBoss
Cache Control
Cache control in IE
need caching
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 04:28:35.