Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Server cache and blah..

Posted on 1998-09-02
4
Medium Priority
?
205 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 150 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

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 overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

662 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