Solved

Forcing no-cache?

Posted on 1998-11-12
4
174 Views
Last Modified: 2010-04-09
Is there a script  that forces the browser never to reload from the cache, and always from the server?
/Al
0
Comment
Question by:algabatz
  • 2
4 Comments
 
LVL 1

Expert Comment

by:nchalasa062698
ID: 1839621
The reload button always compares the cache document to the server document
    and displays the most recent one.

 And you can always clear the cache in the browser if you want.

So is there a particular reason you are trying to do this?
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 50 total points
ID: 1839622
<HTML>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>

should do the trick.
0
 
LVL 1

Author Comment

by:algabatz
ID: 1839623
I haven't tried it yet, but i've never known Michel to be wrong, so i'm awarding him these modest points.
nchalasa: I'm going to use this, since i believe that several large companies are using proxies channelling webpages through to their Intranets and i need the page impressions on my server, rather than on their proxy-server, which only awards my statistics one visiting host, rather than the 60 000 something that hides behind, on f.e. Volvo. But maybe i'm wrong? Is this the way it works? The best thing would of course be if one could force a reload of the html-page, but not the images. That would give me a page impression, but wouldn't affect the downloading time much... 300 points to the one who solves THAT problem!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1839624
I blush!

I do believe the no-cache works across proxies but I have not looked in a log file to be 110% sure.

If you wish to count actual usage, call your counter with a unique value, something like
<SCRIPT>
now = new Date();
document.write('<IMG SRC="counter.pl?' + now.getTime() + '">');
</SCRIPT>
<NOSCRIPT>
<IMG SRC="counter.pl?0>
</NOSCRIPT>

Michel
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML5 frame 5 31
Can't get js include to work in html file 8 20
Angular JS Sticky Footer Problem (when page size doesn't meet minimum) 4 29
edit .asp files 5 31
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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 …

831 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