• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hyperlink And Caching  RSS feed

 
sujatha mamidala
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp page where i have a link to one pdf file. Now, the problem is every time i click the link and open that pdf file. The newer version of that pdf file is not getting displayed. I have to press refresh to see the updated version. I know that browser is caching that perticular page. But how do i prevent an hyperlink from getting cached by a browser. I really need help with this. I have to finish this today. I would really appreciate it if someone can help me in this.
Looking forward for some response.
Sujatha.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could include the following tag to disable client-caching:
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[/qb]<hr></blockquote>
sorry to bring up an old post.
I have a page with many links in it to static resources that are getting cached, obviously. i want to avoid this, meaning, I want my static resources(as hyperlinks) not to get cached.... Does adding the headers you mentioned prevent only the main page where the headers are present from getting cached OR does it also prevent all the static resources(as hyperlinks) in the page from getting cached. I tried adding the headers but it dint work for the case i just described.
shankar.
[ January 16, 2004: Message edited by: shankar vembu ]
[ January 16, 2004: Message edited by: shankar vembu ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tag only works on that page if it even works at all!
The easiest solution is to have the checkbox disabled on your browser that does nto cache and used that page. But you can not touch that on other people's machine
People add session numbers to the end of html paes so it forces a new instance to be used and not the cached version, but I am not sure if that would work with non-html pages.
Eric
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Pascarello:
The easiest solution is to have the checkbox disabled on your browser that does nto cache and used that page. But you can not touch that on other people's machine
Eric

I dint get you. You mean to say I change my internet options to "check for newer version" on "every page visit". This is in IE...
The static resources I mentioned are .mp3 files in my page which I do not want to cache. So is there a way that I make only these namely .mp3 files un-cacheable?? Should I use HTTP headers instead of the HTML meta tags and manipulate somehow...
Regards.
[ January 16, 2004: Message edited by: shankar vembu ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set your options on your browser so it always gets the newer version of the page, but this is not a solution for everyone that comes to your site that does not have that selected.
Eric
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
eric,
i guess this link of yours will solve my problem. it's a nice trick. will check that out. i need some changes in my code for this.
regards.
[ January 16, 2004: Message edited by: shankar vembu ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!