Duplacating an Image() object

D

Daz

Hi everyone.

I have cached an image by setting a variable to contain a new Image()
object with the src of the appropriate file. Rather than making a new
Image() object each time I want to use one, is there any way I can
duplicate it to use the same image, as using the 'new' keyword does
not work. The only other solution I can think of, is to create an IMG
element, and clone that, but surely I shouldn't need to. What I am
trying to acheive is to have images cached, but without relying on the
browsers caching abilities, should they happen to be non-existant or
disabled.

Perhaps I am not using the Image() object correctly, so any light
anyone could shed on this matter would be very much appreciated as
always.

All the best.

Daz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top