Solved

Server cache and blah..

Posted on 1998-09-02
4
202 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
[X]
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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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 style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

688 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