*
The moose likes JSP and the fly likes  How can I configure firefox not to cache the pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark " How can I configure firefox not to cache the pages" Watch " How can I configure firefox not to cache the pages" New topic
Author

How can I configure firefox not to cache the pages

nikita mishra
Greenhorn

Joined: Feb 09, 2010
Posts: 12
Hi I am developing web application . As Firefox caches pages the output page does not reflect the changes I made in the jsp pages. How can I configure firefox not to cache the pages so that it will retrieve only the new pages from the web server?
nikita mishra
Greenhorn

Joined: Feb 09, 2010
Posts: 12
I tried <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> and <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> and also used about:config feature of firefox to disable cache but of no use.
Stephen McConnell
Greenhorn

Joined: Mar 23, 2010
Posts: 19
Get the Firefox plugin/addon "Web Developer".... It allows you to disable cache for your browser (It's a MANDATORY plugin for any web developer 'cause it allows you to check out and control a ton of stuff going on in Firefox when you develop web pages.)


Stephen McConnell


Stephen McConnell

"Boredom is a personal defect"
-- Lamar Stephens
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Of course, it will be some trick to get all users of the application to install that plugin as well.

In other words, don;t rely upon a browser setting. Set the response headers appropriately. See the FAQ on this issue.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
Have a look on this post. http://www.coderanch.com/t/283182/JSP/java/prevent-caching


SCJP 1.5(97%) My Blog
Stephen McConnell
Greenhorn

Joined: Mar 23, 2010
Posts: 19
@Bear

Ah

I was under the impression that he just wanted to not cache pages while he was developing them!!! My bad...

@tripathi

Thanks for the info on that one.... I've bookmarked it.

Stephen McConnell
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Stephen McConnell wrote:I was under the impression that he just wanted to not cache pages while he was developing them!

You're not crazy. I think that is what he asked. But, of course, it's the wrong question.
Stephen McConnell
Greenhorn

Joined: Mar 23, 2010
Posts: 19
@Bear

Yeah... I looked at some of the Firefox bugs and found an ongoing bug with it not recognizing the NO-CACHE meta tag. I was also thinking he may be caching his JSP's on the SERVER side... I had a problem like that once loonnnnnggg ago (with iPlanet, if I remember correctly).

Steve
nikita mishra
Greenhorn

Joined: Feb 09, 2010
Posts: 12
Bear Bibeault wrote:
Stephen McConnell wrote:I was under the impression that he just wanted to not cache pages while he was developing them!

You're not crazy. I think that is what he asked. But, of course, it's the wrong question.

@Bear Bibeault
I think this is how the question should be.
"How can I configure firefox not to cache the pages so that it will retrieve the pages only from the web server and not from the local cache?"

@shivendra tripathi

Tried that one too but of no use.

@Stephen McConnell
You got the question right. But the even after using the addon it still fetches the local cached page.
nikita mishra
Greenhorn

Joined: Feb 09, 2010
Posts: 12
I downloaded chrome just now! It too is returning me old page sometimes, while there is no chance of chrome having a cache of old page. I am using localhost and I am executing the application from Eclipse in the tomcat sever environment. Does that mean tomcat server is caching the pages?
nikita mishra
Greenhorn

Joined: Feb 09, 2010
Posts: 12
Actually What I am doing is generating some errors in the JSP page. The browser displays the error for the first request but after some more requests the browser is returning me the old page(ie the old page sent by the server). Is the tomcat webserver designed to behave like this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I configure firefox not to cache the pages