Solved

Forcing the browser not to load pages from its cache.

Posted on 1998-09-15
2
130 Views
Last Modified: 2010-04-09
I have a static pageA.htm, pageC.htm and pageB.htm .  From pageA I link to pageC .  PageC contains a frameset: frame1 displays some static web page; frame2 displays pageB.htm
Suppose I am currently at looking at pageC in the browser, then I modify pageB in NotePad, than in the web browser I link back to pageA, and from there link to pageC.  PageB will not show the  modification I just made to it in NotePad.  If I click the Reload button in the browser however, pageC will update itself showing the modifications made to pageB inside frame2.  I guess this is because of the cache in the memory of the browser.
To solve the problem, I put:
<meta http-equiv="Expires" content="January 1, 1970 00:00:00 GMT"> in the <head> of pageC and pageB.  However, this did not solve the problem of loading pageB with its lastest content unless I refresh using the Reload button. Help!
0
Comment
Question by:matala
2 Comments
 

Author Comment

by:matala
Comment Utility
I actually got it to work just now; thanks in advance for anyone who attempted to help.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 50 total points
Comment Utility
Try to put this in pagec:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!-- //cloak
function loadFrame() {
   now = new Date();
   top.FRAMEB.location = 'http://myserver.com/pageB.html? '+ now.getTime; /* add the time to the pagename - forces new load each time */
}
// uncloak --></SCRIPT>
</HEAD>
<FRAMESET COLS="50%,*" onLoad="top.loadFrame()">
<FRAME NAME="FRAMEA" SRC="static.html">
<FRAME NAME="FRAMEB" SRC="javascript:' '">
</FRAMESET>
</HTML>

Michel
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now