473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Don't cache changed image.src?

Hi.

I have a webcam page (video surveillance) that refreshes 9 images
once a second (1000ms rate). It uses javascript to change the
image.src

To trick the caching mechanism of the browser and force a fresh
download from the IP camera, a random tag is appended to the URL.

Unfortunately MSIE6 (WinXP) caches each and every frame ON DISK.
That is, while the page is displayed, the harddrive stores 9*20kb
or ~200kb per second. And worse, MSIE lets the temp folder grow
very big, resulting in reduced system performance (especially
when booting up after a work-day of video surveillance).
What can I do about it? The life-time of an image is 1 second,
it will never be used again. I don't want the browser to store
it on the harddrive.

I tried this on my page:

<HEAD> <META http-equiv="Pragma" content="no-cache"> </HEAD>

but it seems to work only for the HTML portion of the page, not
for the image.src loading.
I tried to locate a RAM drive where I can point the MSIE6 temp
folder to, so that at least it won't cache on the harddrive,
but couldn't find any solution (for WinXP) either. And also, I
went for HTML/JavaScript to NOT have to install anything on the
client machine :(
Can you point me to a solution for this problem?

Marc
Jul 20 '05 #1
2 12343
On 28 Jun 2003 10:21:06 -0700, je*****@hotmail.com (jetmarc) wrote:

i.
I tried this on my page:

<HEAD> <META http-equiv="Pragma" content="no-cache"> </HEAD>

but it seems to work only for the HTML portion of the page, not
for the image.src loading.
Of course, why would it work anywhere else?
Can you point me to a solution for this problem?


If you'd read the FAQ, you'd've seen the link to
http://www.mnot.net/cache_docs/

It will not, and cannot be solved with javascript.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2
On 28 Jun 2003 15:46:51 -0700, je*****@hotmail.com (jetmarc) wrote:
If you'd read the FAQ, you'd've seen the link to
http://www.mnot.net/cache_docs/

It will not, and cannot be solved with javascript.
Thanks for your follow-up.

Actually I have seen that page before, when researching. The problem
is that I don't have any influence on the HTTP headers, because the
image URL is on a physically separate web cam (Axis 2100 IP network
camera).


Then get some influence, simply proxy it through a real server, and
next time choose a tool that allows you to do your job.
I think, actually the MSIE browser does honor the no-cache pragma in
that it reloads the HTML page _AND_ the initial dummy images from
scratch each time I open the page.
It's unlikely that a web cam server is sending cacheable headers,
therefore IE won't cache the image between page reloads on its default
setting - it wll within instance.
I conclude that maybe Axis as a manufacturer of
web cams themselves did not find a way to circumvent MSIE's behaviour
of producing a local FILE
IE does not _always_ save a local file.
Basically, I'm looking for a client-side solution.
There is no client-side solution...
I can't change
the cameras behaviour unless I re-engineer their embedded firmware,
or cache all cam images on a linux server


No, it's simple, put Apache as a proxy between the web and the camera,
you can then control the headers and everything else in Apache.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Samuel | last post by:
Is there anyway to get IE to cache a redirected image? For example, I have an page with the following: <html><body> <img src=http://site1.com/redir.php?id=12> </body></html> The image is...
7
by: luc | last post by:
I have found some code that will prevent visitors to our website from right clicking on our images to save them to there disk. But in windows xp this code is useless because when you rollover an...
0
by: Pål Johansen | last post by:
Hi all I have an jpeg image(Dynamically created) that is returned from a page as binary stream. Also i have set the cache policy as public, but the client refuse to cache the image. The page...
1
by: Giggle Girl | last post by:
Hello, I am helping to design a web application that uses 167 little icons on various pages in a framed environment. As is, the app loads each icon on a page by page basis, and if an image...
2
by: bedges | last post by:
okay, the scenario: i have a header image which changes randomly across all pages in the site. that works fine. i also have an image preloader within the random header picker which theoretically...
4
by: Jim Michaels | last post by:
<?php include 'dbinc.php'; $result = mysql_query("SELECT image,mime_type FROM photos WHERE image_id=".intval($_GET), $link) or die("MyErr:".mysql_error()); if ($row = mysql_fetch_assoc($result))...
2
by: luci | last post by:
Hi, i'm writing a pice of code to fill the image control (in asp.net page) with a image uploaded on the server. The way I used is this: protected void cmdUpload_Click(object sender, EventArgs...
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
11
by: Jerry J | last post by:
How can I get an asp:Image to refresh when a user uploads a different jpg. I disabled caching using this command on Page_Load(): Response.Cache.SetCacheability(HttpCacheability.No Cache); but it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.