Solved

Server cache and blah..

Posted on 1998-09-02
4
200 Views
Last Modified: 2010-04-09
my web site is located on a virtual server running IIS4. on the site, i'm hosting a webcam and a few isapi extensions..

the problem is, the server is set up to cache files.. when, for example, a few people look at the webcam for a few minutes, the picture will hang after a while because the server begins caching it. thus it won't reload the newest picture even though it's reloading..

this caching ALSO causes a problem for my isapi dlls.. apparently, when a dll is loaded on my site, the nt box won't let go of it incase i need to delete/update it..  

i know caching can be turned off on the server, but 1) i don't have access to the server (because again, it's a virtual host and i have no physical contact with the machine) and 2)my provider says the only way they know how to disable the cache is to disable it for the whole machine.. obviously this would slow down the machine considerably..

my question: is there a way to write something in my html files that will make sure the file doesn't get cached? or is there another way to get around this?

0
Comment
Question by:rabbitears
  • 2
4 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1837346
Try this in your <HEAD>:
<META NAME="pragma" CONTENT="no-cache">

Martin
0
 
LVL 4

Expert Comment

by:martinag
ID: 1837347
And in perl scripts you can print it with the header like this:
print "Content-Type: xxx/xxx\nPragma: no-cache\n\n";

Martin
0
 
LVL 1

Accepted Solution

by:
drepetto earned 50 total points
ID: 1837348
If yo're looking for the fast&easy way...

<META HTTP-EQUIV="Refresh" CONTENT=300 >
<META HTTP-EQUIV="Expires" CONTENT="Thu, 03 Sep 1998 09:25:08 GMT">

Is an example that instruct the cache and the browser on how to treat your page.
Thus you can control how long your documents may be cached and how often
your pages must be (automatically) RELOADED by the remote browser.
Very handy for the WEBCAM.
(Remember that upon RELOAD requests cahes get purged.)
note: When you hit RELOAD on IE4 it actually does a REFRESH not a RELOAD.

The other way, as suggested by martinag, instead will whitch off the cache
without any condition and I suggest you use it for your scripts.

"      <META NAME="pragma" CONTENT="no-cache">

And in perl scripts you can print it with the header like this:
      print "Content-Type: xxx/xxx\nPragma: no-cache\n\n";
"
Also, you should be aware that well behaving caches will not cache
URLs that contain  "cgi-bin" or "?".

Try asking your provider which kind of cache stoplist does he use.
0
 

Author Comment

by:rabbitears
ID: 1837349
the <META NAME="pragma" CONTENT="no-cache">  solution will probably work best.. on a webcam though, the refresh method is not always good if you're loading more than one picture or one larger picture because if the refresh rate is like 15 seconds, the page will try to refresh before the picture is done..

for that i have used ONLOAD in the body and history.Go(0) in a function..
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
Easy responsive table out of existing table 28 60
How to make footer stick to bottom 9 37
Which non-HTML GUI front end to use with Java? 3 24
alert(innerHTML); 8 32
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

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