On 7 Jan 2004 08:42:29 -0800,
(jubes) wrote:
>Since the application uses frames I use an array of Image objects to
>cache the image in the top frame. Now replacing an exsiting the image
>source on an existing image tag is easy (ie imgTag.src =
>imgArry[i].src) and there is no HTTP request back to the server.
That would all depend on the cache settings, if the above doesn't make
an http request, then I'm surprised an innerHTML call does, I've
never seen where the 2 are not absolutely equivalent.
>Why does the last scenario make a HTTP request? Also is there a way to
> create an image tag on the fly without it making a HTTP request?
Nope, but IE fully honours cache settings, and you really should not
have got this far without visiting htt://www.mnot.net/cache_docs/ do
so now, and your problems will go away.
Jim.
--
comp.lang.javascript FAQ -
http://jibbering.com/faq/