Solved

Forcing no-cache?

Posted on 1998-11-12
4
155 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
Comment Utility
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
Comment Utility
<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
Comment Utility
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
Comment Utility
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

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

Title # Comments Views Activity
Column Spacing 3 33
CSS/audio questions 2 48
HTML page and JavaScript 2 48
Javascript: Find and Enable Submit Button in Table 3 24
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

763 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

7 Experts available now in Live!

Get 1:1 Help Now