Gossamer Forum
Home : Products : DBMan : Customization :

html_print_headers Question...

Quote Reply
html_print_headers Question...
Can someone tell me what if any problems removing the following lines from html_print_headers would cause?

print "Pragma: no-cache\n";
print "Cache-control: no-cache\n";

Having these lines causes users not to be able to use the back button - without getting "page expired" error.

Is there any way around this?

Thanks !
----------------
donm

Quote Reply
Re: html_print_headers Question... In reply to
There would be no problem at all removing those lines in your header. I didn't see them in the versions I have?

What those lines do is to prevent your pages from being cached (saved) on your visitors hard drive. When pages are not cached, then functions such as filling out forms, etc. are not saved once you leave that page.

On static pages, you would usually want to not cache pages unless it contains a form.

Hope this helps


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: html_print_headers Question... In reply to
Dear Domn,

The no-cache pragma setting forces a page to be reloaded by browsers that support this function. Removing these setting might result that your browser will show old information in case a visitor doesn't refresh a page. It will then show a page of which the information is stored on your local harddisc instead of the web server.

Regards, Marcel

Quote Reply
Re: html_print_headers Question... In reply to
PRAGMA

If you have ever had readers tell you that they are seeing an old version of your page when you know that you have updated it, you may want to make sure that their browser isn't caching the Web pages. If your page is still cached on another's computer, it will pull up that copy of the page rather then any changes you may have made since.

Pragma provides a method in which you can control browser caching. To use this tag, the value must be "no-cache".
When this is included in a document, it prevents Netscape Navigator from caching a page locally.

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

The codes you were referring to in your original post are for IE, both sets of codes should be used to prevent caching for both browsers.


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/