Preload Images

S

shapper

Hello,

How can I preload a few images of a page javascript?
Should I use CSS to do this? Is it even possible?

Thanks,
Miguel
 
E

Erwin Moller

Thomas said:
Erwin said:
shapper said:
How can I preload a few images of a page javascript?
[...]
Go to google:
http://www.google.com

Type in the searchbox:
preload images javascript

Follow any of the 985,000 links, eg the first.

However,

http://groups.google.com

and

preload images group:comp.lang.javascript

returns more useful information.

Good advise.
Please trim your quotes as described in the FAQ Notes.

The two lines from the OP?
Get real.

Regards,
Erwin Moller
 
T

Thomas 'PointedEars' Lahn

Erwin said:
The two lines from the OP?
Get real.

It was four lines that you did not refer to but quoted anyway, and you
did it again. Read the FAQ.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Randy said:
Thomas 'PointedEars' Lahn said the following on 11/27/2007 6:19 PM:

You should try some relaxation techniques. Then you wouldn't stay as
wound up as a two dollar watch.

I am quite relaxed, thank you. However, I found it necessary to point out
that Erwin's posting style, which is against established Usenet conventions,
will confuse people, and even irratate some. It was not the first time that
he did this, and it turned out it was not the last time.

I would like to remind you that you reduce your credibility as the FAQ
maintainer by issuing statements that imply FAQ content not to be important.


PointedEars
 
E

Erwin Moller

Thomas 'PointedEars' Lahn wrote:

I am quite relaxed, thank you. However, I found it necessary to point out
that Erwin's posting style, which is against established Usenet conventions,
will confuse people, and even irratate some. It was not the first time that
he did this, and it turned out it was not the last time.

Hi Thomas,

I have been posting on usenet for ages. You are the first that complains
to me about my posting style. People complaint to me about other things
I wrote a lot, but lets leave that. ;-)
Yes, I know of the conventions you refer to, and I follow them when they
seem to make sense to me. A 2 line question is considered by me very
short and to the point, and I don't see how cutting would increase
readability for anyone with an IQ over 60.

And irritating people?
Me?
Check this very group and see which one of us gets/attracks the most
annoyed reactions...

I would like to remind you that you reduce your credibility as the FAQ
maintainer by issuing statements that imply FAQ content not to be important.

This is not the first time I hear you complain out in the open about
Randy being the FAQ maintainer.
Did you had an eye on that task and didn't get it maybe?
I don't know your history, but that returning comment surely makes me think.

Oh: Get happier man. It really helps.

Regards,
Erwin Moller
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>, Wed,
I am quite relaxed, thank you. However, I found it necessary to point out
that Erwin's posting style, which is against established Usenet conventions,
will confuse people, and even irratate some. It was not the first time that
he did this, and it turned out it was not the last time.

Established Usenet convention is to be reasonably tolerant, and not to
reply in a Gestapo-like fashion at any unimportant breach of one's
interpretation of the rules.

One notes that you are evidently found to be similarly arrogant and
obnoxious in de.c.l.j.
 
V

VK

Hello,

How can I preload a few images of a page javascript?
Should I use CSS to do this? Is it even possible?

That is a question. Initially in Netscape 3.x they introduced
scriptable .src property for images so developers could achieve roll-
over effects for graphics menu elements. To avoid load delays for the
first mouseover they also introduced Image constructor. The purpose of
this constructor was that by making
var imgOver = new Image;
imgOver.src = 'some/url';
script issued load request for the new image so it would be pre-
cashed. As DOM 0 supported by all - even the most lousy - modern
browsers the answer would be "Yes, it is easy, use Image objects on
page load". But as much as I remember, this feature exposed browsers
to numerous cache misuse, like
var bogusImg = new Image;
bogusImg.src = 'some/10Mb-100Mb/image';
and as I remember some precaution limitation had been made up to stop
caching images completely on imgObject.src="url" assignments.
What browsers still do such caching and if any left at all is a good
question to check.

P.S. Maybe that would also explain the origin of FAQ 4.31
http://www.jibbering.com/faq/#FAQ4_31 that puzzled me all the time -
because no Web developers in any sanity would ever use server-side CGI
image generators for menu buttons nor would patch content header for
still images. I looked through the clj archives and the time this FAQ
was proposed overall matches to the period of "cache attacks" as my
weaked memory tells me :) So possibly we have in this FAQ a dog
barking to an all wrong tree.
 

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

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,298
Latest member
ZenLeafCBDSupplement

Latest Threads

Top