Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preload Images

1 view
Skip to first unread message

shapper

unread,
Nov 26, 2007, 6:17:28 AM11/26/07
to
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

Erwin Moller

unread,
Nov 26, 2007, 7:24:37 AM11/26/07
to
shapper wrote:
> Hello,
>
> How can I preload a few images of a page javascript?

Hi,

Go to google:
http://www.google.com

Type in the searchbox:
preload images javascript

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

Regards,
Erwin Moller

Thomas 'PointedEars' Lahn

unread,
Nov 26, 2007, 6:28:40 PM11/26/07
to
Erwin Moller wrote:

> shapper wrote:
>> 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.


Please trim your quotes as described in the FAQ Notes.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300...@news.demon.co.uk>

Erwin Moller

unread,
Nov 27, 2007, 5:31:25 AM11/27/07
to
Thomas 'PointedEars' Lahn wrote:
> Erwin Moller wrote:
>> shapper wrote:
>>> 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

>
> PointedEars

Thomas 'PointedEars' Lahn

unread,
Nov 27, 2007, 6:19:37 PM11/27/07
to
Erwin Moller wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Please trim your quotes as described in the FAQ Notes.
>
> 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
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Randy Webb

unread,
Nov 27, 2007, 6:30:20 PM11/27/07
to
Thomas 'PointedEars' Lahn said the following on 11/27/2007 6:19 PM:

> Erwin Moller wrote:
>> Thomas 'PointedEars' Lahn wrote:
>>> Please trim your quotes as described in the FAQ Notes.
>> 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.

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

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Thomas 'PointedEars' Lahn

unread,
Nov 27, 2007, 6:40:52 PM11/27/07
to
Randy Webb wrote:
> Thomas 'PointedEars' Lahn said the following on 11/27/2007 6:19 PM:
>> Erwin Moller wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Please trim your quotes as described in the FAQ Notes.
>>> 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.
>
> 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.

Randy Webb

unread,
Nov 28, 2007, 12:09:33 AM11/28/07
to
Thomas 'PointedEars' Lahn said the following on 11/27/2007 6:40 PM:

> Randy Webb wrote:
>> Thomas 'PointedEars' Lahn said the following on 11/27/2007 6:19 PM:
>>> Erwin Moller wrote:
>>>> Thomas 'PointedEars' Lahn wrote:
>>>>> Please trim your quotes as described in the FAQ Notes.
>>>> 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.
>> 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.

Then I find it necessary to point out that you have posted way more than
those two lines to complain about those two lines. If it had been enough
to have been worthwhile, then sure. But two lines? Wind down my friend.

> 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.

I said the FAQ content isn't important? Wow. You are pedantically
complaining about two lines. I quote a lot more than that, are you going
to start being pedantic with me as well?

Two lines crosses into a gray area where you have to apply some common
sense sometimes and realize it causes more problems to complain than the
two lines ever did.

Erwin Moller

unread,
Nov 28, 2007, 3:28:29 AM11/28/07
to
Thomas 'PointedEars' Lahn wrote:

<snipped for Thomas>

> 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

>
>
> PointedEars

VK

unread,
Nov 28, 2007, 10:40:26 AM11/28/07
to

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.

Dr J R Stockton

unread,
Nov 28, 2007, 8:41:55 AM11/28/07
to
In comp.lang.javascript message <474CAB04...@PointedEars.de>, Wed,
28 Nov 2007 00:40:52, Thomas 'PointedEars' Lahn <Point...@web.de>
posted:

>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.

--
(c) John Stockton, Surrey, UK. ???@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.

0 new messages