Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cache a web page even if the browser setting is new page every visit to the page

Posted on 1999-01-05
6
Medium Priority
?
211 Views
Last Modified: 2010-04-09
Is there a way with meta tags or cache-control or any other way to force the browser to use a browsercached copy of a page instead of loading a fresh one if the browser setting is set for a new page every visit to the page ? If a user fills in a form and get an error response i would like it if the user could press the back button and get the form with the data that the user already has filled in - not an empty form. Thanks in advance !
0
Comment
Question by:adbkp
6 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1841298
In Netscape, the information will be there no matter if the cache is on or off. In IE3, the information will be away (not sure about IE4/5).

Martin
0
 
LVL 6

Expert Comment

by:PBall
ID: 1841299
It sticks too in IE4.  So what's this question good for then hehe.
0
 

Author Comment

by:adbkp
ID: 1841300
Adjusted points to 200
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Accepted Solution

by:
jbrugman earned 400 total points
ID: 1841301
you can use the following(a lot of work though :-)
mind the difference between 'and " !
It's not real caching, but you'll get the idea.

<HTML>

<SCRIPT LANGUAGE="JavaScript">
function cachedpage() {
document.write("<HTML>");
document.write("<BODY BACKROUND='back.jpg'>");
document.write("<FONT FACE='ARIAL'>the cached page</FONT>");
document.write("</BODY></HTML>");
</SCRIPT>

<BODY>
<FORM>
<INPUT TYPE="BUTTON" onClick"="cachedpage()"
</FORM>
</BODY>
</HTML>
0
 
LVL 4

Expert Comment

by:martinag
ID: 1841302
I don't get the idea.

BTW, that script won't work with...err...most browsers (maybe none (don't know that much about IE)). You'll have to open() and close() the document:
  document.open();
  document.write(...);
  document.close();

Martin
0
 
LVL 4

Expert Comment

by:jbrugman
ID: 1841303
You are able to read the form, pass the data to hidden fields, then put them in a pre-written page, like document.write("name <INPUT TYPE=tekst VALUE="+namefield+">") when hitting back, the data is still in the form. (it's no real caching).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

810 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