• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching the web page in client machine's browser

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I'm struck up with one issue in caching the web page in client machine's temporary internet files. I have designed a secured web application. I used

<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
%>
for not storing the web page in client machine. Now only some of the pages that doesn't needs the security needs to be cached in the client machines temporary internet files.
For that i used the code as
<%
response.setHeader("Cache-Control","public");
response.setHeader("Pragma","public");
response.setDateHeader ("Expires", 0);
%>
Still i'm unable to store. Please help me solve this. Thanks in Advance. Quick help would be greatly appreciated.

Thanks and regards,
Prakash
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tend to use something like these when encouraging resources to be cached:

 
Rajendiran R. prakash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friend,
Thanks for the quick reply. But it doesn't work. Is there any other idea.


Thanks & Regards
Prakash...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajendiran R. prakash:
Hi friend,
Thanks for the quick reply. But it doesn't work. Is there any other idea.


Thanks & Regards
Prakash...



Maybe you could give us a little more to work with than "it doesn't work".
How do you know it doesn't work?
What did you do to test it?
What were you expecting?
What did you see?

I, for one, wouldn't spend very much effort to help you after seeing how quickly you dismissed David's response.

[ March 13, 2008: Message edited by: Ben Souther ]
[ March 31, 2008: Message edited by: Ben Souther ]
 
Rajendiran R. prakash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ben,
When i used the above code with some slight alterations, it works for my system(Stand alone). But when i tried with another system with this systems url it doesn't works. Help me please....
Sorry if it hurts David.........
Regards,
Prakash.


It Would be helpful if it is still clear....
 
Rajendiran R. prakash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ben and David,

Sorry for that. It really hurts some one who help others. It works perfectly for me. I used the david's code with some alterations. Now i changed my code according to David's code. While i use that exactly the same way, it works perfectly. Also I had some browser issue. Once i reset it to default settings and tried it works fine.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the feedback.

This is an important issue with respect to caching or not caching data on the client. Anything you do is just a request to the client and they are free to do what they want. That is, you can ask them to cache the code and they may decide not to, or you may ask them to cache the data and they may decide not to.
 
Rajendiran R. prakash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you David,
I feel sorry for that reply.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing personal

I should also point out that the best you can do is look at the response headers too make sure the headers are being sent.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic