473,769 Members | 6,473 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 1897
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
1276
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
2108
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 caching problem the scripting seems to work Any help welcomed:
1
1584
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
1967
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 Response.Cache.SetCacheability(HttpCacheability.NoCache) would have achieved this, but it seems to only prevent the .aspx file from...
1
2273
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
6961
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 see the updated graph image. Although this problem doesn't occur on the local server.
4
2696
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
6904
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? Also, is there a way to prevent printing on a current page? We're already not showing the menu...
0
9589
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.