Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 1999-01-05
6
183 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Accepted Solution

by:
jbrugman earned 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

808 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