Solved

Server cache and blah..

Posted on 1998-09-02
4
198 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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.
Find out what you should include to make the best professional email signature for your organization.
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…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

895 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

13 Experts available now in Live!

Get 1:1 Help Now