473,543 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web App Image Caching

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 changes (like a "plus" becomes
a "minus" when a folder icon is expanded) is does a

document.all[img].src="picsV/minus.gif"

which I am pretty sure goes and grabs the image at that moment, making
no use of caching images at all.

QUESTIONS

1. Does it make sense to use javascript to do a

var Icon_Minus = new Image
Icon_Minus.src = "picsV/minus.gif"

in the main frameset for each of the icons that change (which is about
50), so I will have all changeable icons cached for quick display on
each page when they change?

2. Can you "flip" images in sub-frames that were cached in a parent?

Thanks,
Ann

Feb 9 '06 #1
1 1878
VK

Giggle Girl wrote:
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 changes (like a "plus" becomes
a "minus" when a folder icon is expanded) is does a

document.all[img].src="picsV/minus.gif"

which I am pretty sure goes and grabs the image at that moment, making
no use of caching images at all.


You have a wrong idea of how the browser cach is working.

Say you have an image "http://www.myserver.co m/pics/minus.gif" This
image has to be retrieved at least once from the server: and it is
retrieved once the first time the image is displayed or initialize over
Image object. Ever after your browser will take the image from the
cache w/o extra loading from the server.

You don't need to worry about caching, just opposite you need to take
extra steps to *not* cache an image (by say randomizing its URL).

The traditional image precaching:
var iOver = new Image();
iOver.src = 'http://www.myserver.co m/pics/foo.gif';
doesn't affect on the cache behavior. It is used to avoid the *initial*
delay when say foo.gif is requested for the first time. After the first
usage (so the image was cached) there is absolutely no difference
whether you precached that image or not: it will be still taken from
the local cache with the same speed.

Feb 9 '06 #2

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

Similar topics

2
1270
by: badz | last post by:
I try cache the image but it retun nothing sometimes this error come out "failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied" This is my code: ob_start(); header("Content-Type: image/jpeg\n");
1
2090
by: Grunt | last post by:
Hi, I have been trying to put together a rotating banner. the code works but I am having a problem with the caching of the banner images. no matter what I try the page is constantly reloading the images, even worse they are not loading completely. This version includes a (vain) attempt at forcing the banner images to cache. Apart form the...
1
1550
by: vip001 | last post by:
Hello This is the site developed for one of my client 'Direct2deal.com' (http://www.direct2deal.com) This site has lots of images and hence downloading time of home page i much more..Is there a way , where i can cache these images i javascript????? Your suggestions will be highly appreciate
7
1955
by: Nathan Sokalski | last post by:
I have been trying to find a way to prevent the images on my site from being cached on the user's machine. I want to avoid this because the images used in an Image control often change, yet have the same name. When they are cached, the cached image is displayed which is not what I want. I thought that using...
1
2262
by: Kamyar Souri | last post by:
How can I disable Image caching? I use ASP.NET Image web control that it's ImageUrl is constant but the image is being changed by the code. because of cachin I always see the same image in my Image web control. Thank you in advance.
2
6943
by: Mike Sobeiski | last post by:
Hi There! I'm developing a web project that requires to produce charts off the database and output it as image and presented to the user in a HTML document. (NOTE: Image is not directly streamed, but just linked in HTML output). The problem is, when user want to see the graph by changing parameters, they always have to click refresh to...
4
2682
by: Jake | last post by:
Does cookieless session state (with the sessionid embedded into the url) interfere with the browser's retrieval of cached images from one session to the next? Does the sessionid embedded into the url effectively limit client-side image caching to the lifetime of the session? Thanks Jake
9
6891
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
I'm working on a litigation web app where users will review images of case documents. One of the requirements is that we either prevent the images from being cached on the clients machine (in temp directory or anywhere else) or we encrypt the images somehow. I'm guessing that encryption will not work, but is there a way to prevent caching? ...
0
7411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5888
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5282
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4898
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3394
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3394
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
643
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.