wood burning stoves 2.0*
The moose likes JSP and the fly likes JSP image caching problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

JSP image caching problem

keshab kc
Greenhorn

Joined: Dec 03, 2007
Posts: 4
Hi friends,

I read various articles of this forum, but i could not solve my problem, my problem is image caching in IE 7 browser.

I have big application which are using the JSP, servlet, weblogic 8.1 and apache server in Linux environment.

Now my problem is, for different login, there are different images, that comes dynamically; should be shown but the pages are showing same images. when i refresh the pages through mouse help then it works fine.

I used frameset to load all the subsequent pages .

I also uses following to solve the issues , but couldn't:

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

couldn't solve the problem but when i delete all IE temporary file or refresh the pages it solves,


please help me ASAP, its really urgent.

keshab kc
software engineer (j2ee)
[ December 03, 2007: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"keshab kc",
Please check your private messages.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
keshab kc
Greenhorn

Joined: Dec 03, 2007
Posts: 4
Hi Fren,

How can i check the private message?

for latest try, i use the following codes to jsp pages:

response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setDateHeader("Expires", 0); //prevents caching at the proxy server
response.setHeader("Cache-Control", "private"); // HTTP 1.1
response.setHeader("Cache-Control", "no-store"); // HTTP 1.1
response.setHeader("Cache-Control", "max-stale=0"); // HTTP 1.1

response.addHeader("Cache-Control","no-cache, must-revalidate");
response.addHeader("Cache-Control","post-check=0, pre-check=0");

still couldn't solve , please if you guys have any idea help me asap!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Originally posted by keshab kc:
How can i check the private message?

Perhaps you could try clicking on the link that says "My Private Messages"?
[ December 03, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
keshab kc
Greenhorn

Joined: Dec 03, 2007
Posts: 4
hi all, please help my problem above!!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"keshab kc ",
Welcome to JavaRanch!

We're pleased to have you here with us here on the ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Initials are fine for the first and middle name but we require a full last name. You can change it here
keshab kc
Greenhorn

Joined: Dec 03, 2007
Posts: 4
I hereby confirm that the above solution that i have mentioned works perfectly, earlier i was wrong.

But um..........think we have to implement these correctly correctly in correct place.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"keshab kc",

Please be aware that, after 3 warnings, accounts with invalid screen names are subject to being closed. This counts as number 4.
[ December 05, 2007: Message edited by: Ben Souther ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

"keshab kc", your account has been disabled. Should you wish for it to be re-enabled, you must contact me by email.
[ December 06, 2007: Message edited by: Bear Bibeault ]
 
jQuery in Action, 2nd edition
 
subject: JSP image caching problem
 
Similar Threads
response.setHeader("Refresh", "10; URL=http:\\ www.javaranch.com");
back button caching problem in firefox browser
Re-login issue after click on browsers back button and press refresh
prevent page caching
Log out Functionality for my Web Application