472,958 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 1189
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: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.