473,406 Members | 2,698 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,406 software developers and data experts.

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 1863
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.com/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.com/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
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(); ...
1
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...
1
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...
7
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...
1
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...
2
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...
4
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...
9
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...
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...

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.