Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Caching in Netscape

Status
Not open for further replies.

inbal

MIS
Aug 15, 2000
3
IL
Hi all!<br>I need to disable history for Netscape. <br>I've used the server side script(in VBScript)and wrote &lt;%Response.Expires=0%&gt;. <br>In IE this is enough for not using a cached page, but reloading it from fresh.<br>Also in NetScape, on some servers it works, and on some it doesn't.<br>So, I thought maybe JavaScript in the client side would help me convince NetScape not to cash the pages.<br><br>Can your experience help me?<br>Yours Yael
 
Inbal,

Internet Explorer supports a mechanism known as pragma no-cache, using the <META> element to prevent pages from being cached by the browser. Using this method, you can prevent the page that contains the HTML from being cached by the browser, ensuring that the most recent version of the page is always seen by the user. This is especially useful for pages that may be dynamically created (for instance, search query results, or database searches). To take advantage of this mechanism, use the EXPIRES keyword, together with a date that has already past. For example :

<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;Mon, 06 Jan 1990 00:00:01 GMT&quot;>

For Netscape, I can only suggest you look up their reference site:

 
If you want to disable caching on a page by page basis using client side javascript use: location.replace(URL) with the URL being the link that the person selects to go to the new page. This will erase the history.
 
Hi dch5314!
I've tried doing both :
location.href and
location.replace

but both didn't work in Netscape.
The interesting fact is that only when the script files are in one NT server, and run through my win 98 PC and Netscape as the browser - the cashing takes place.

If I run a copy of the same scripts sitting on my win 98 PC, and again Netscape as the browser, the page is loaded from scrach and not from cach.

This behavior is something I really don't understand!!!

Can you?

Yours Yael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top