473,386 Members | 1,860 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,386 software developers and data experts.

Image cache breaks

Hi all,

I am using this javascript to preload a series of low resolutio
images, that are used to in conjunction with a slider. It work
perfectly. (jvLoResPathArr is an array of urls to the images)

if(document.images) {
imagesCache = new Array()
for (i=0;i<jvLoResPathArr.length;i++) {
imagesCache[i] = new Image
imagesCache[i].src = jvExternalSharePath + jvLoResPathArr[i]
}
}

However!!!!!!

I allow the user to click on the current low resolution image, so the
can see the hi resoltion image in a child window. Now after they d
that, the images are no longer cached???????? It seems they ge
'pushed' out of the cache.

the code to open the new window is:
win = window.open("HiResWindow.cfm", "HiResWindow"," width=" + width
",height=" + height + ",left=0,top=0,toolbar=no
menubar=no,scrollbars=no, resizable=yes, location=no, directories=no
status=no")
Has anybody got any ideas?

Thanks for any help.
When the use
-
johnthoma

Jul 23 '05 #1
1 1202
Lee
johnthomas said:

Hi all,

I am using this javascript to preload a series of low resolution
images, that are used to in conjunction with a slider. It works
perfectly. (jvLoResPathArr is an array of urls to the images)

if(document.images) {
imagesCache = new Array()
for (i=0;i<jvLoResPathArr.length;i++) {
imagesCache[i] = new Image
imagesCache[i].src = jvExternalSharePath + jvLoResPathArr[i]
}
}

However!!!!!!

I allow the user to click on the current low resolution image, so they
can see the hi resoltion image in a child window. Now after they do
that, the images are no longer cached???????? It seems they get
'pushed' out of the cache.


There are a couple of possibilities, depending on how
you're displaying the low resolution images and how
you're popping up the hi res version.

If you assign the src of the low res images by specifying
the full URL again, rather than by assigning from the src
of the imagesCache[] array, then you're bypassing the
pre-loaded versions and are subject to having data pushed
out of the cache.

But it seems unlikely that your hi res versions are big
enough to clear the cache.

It would help to have a link to your page, or to see
more of the relevant code.

Jul 23 '05 #2

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

Similar topics

6
by: Ken | last post by:
How does IE6 control the display of images? I change the content of a image file image1.jpg without changing the file name. Then jump to a new page to display it. IE6 does not displays the...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
3
by: xzzy | last post by:
A. I need to access: System.Web.HttpContext.Current.Cache but get this error: "Object reference not set to an instance of the object" B. System.Web.HttpContext.Current.Cache is accessible...
2
by: thehuby | last post by:
I am building a CMS and as part of it a user can upload an image. Once uploaded I am displaying the image. If the user then decides they want to replace the image with another I get a caching...
62
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
6
by: Mark Denardo | last post by:
I created a Web Image "<asp:Image ID="Image1" ..." that my code behind set to a certain image file say image1.jpg =Image1.ImageUrl = "<rel_path>/image1.jpg"; which set the image ok, but then I...
1
by: Chuck Anderson | last post by:
I'm using a simple, pseudo progress bar. Very simply, I display a still image next to a form submit button until the user clicks on it, and then I change the image source to an animated version of...
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...
2
by: jeanray | last post by:
I have a site made entirely with AJAX, base PhP and MySQL, so the is only one page (index.php). The user goes through various selections and an image is formed (on the server), then sent back to the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.