/    Sign up×
Community /Pin to ProfileBookmark

preloading images

Question: Using JS
Preloading images is only effective for images being loaded on PRECEDING pages, not on the same page thats showing the image, right?

This would mean that you couldnt preload any images on your index.html page, since it is the first loaded page?

to post a comment
JavaScript

14 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 06.2005 — No, the JavaScript for pre-loading images is processed before the rest of the page is loaded. You could pre-load all images for your site in index.html (not advisable).
Copy linkTweet thisAlerts:
@ranosbauthorApr 07.2005 — But the loading speed would be the same? Seems it wouldnt matter if it was loaded first or during page normal loading...???

So preloading images for the same page thats displaying them does not speed up the loading of your page then?
Copy linkTweet thisAlerts:
@Khalid_AliApr 07.2005 — preloading images oinly speeds up rendition if images when its required.
Copy linkTweet thisAlerts:
@ranosbauthorApr 07.2005 — What does that mean?
Copy linkTweet thisAlerts:
@ranosbauthorApr 07.2005 — So preloading on the same page is not recommended?
Copy linkTweet thisAlerts:
@robo_neojetsamApr 07.2005 — so preloading of images would load the images (or what ever your preloading) first before the rest of the page, im sure it would slow the page loading time down.
Copy linkTweet thisAlerts:
@FangApr 07.2005 — The point of pre-loading images is that when the page is displayed the images are available for imediate display. You don't get an empty image box after the page loads while an image is being downloaded.

And yes it will delay the initial display of the page.
Copy linkTweet thisAlerts:
@robo_neojetsamApr 07.2005 — The point of pre-loading images is that when the page is displayed the images are available for imediate display. You don't get an empty image box after the page loads while an image is being downloaded.

And yes it will delay the initial display of the page.[/QUOTE]

Thats exactally what i mean, it will slow page loading time but it wont display those box thingies that show an image is being loaded.

Is it worth having extra loading time, in that time it [I]might [/I] take to load, your users might decide not to load the page at all.
Copy linkTweet thisAlerts:
@FangApr 07.2005 — The pre-loading is usually applied to secondary images, rollovers or enlarged images of thumbnails.

The decision to do this is a personal one, depending on the size of images and if you always want to show your images without a delay.
Copy linkTweet thisAlerts:
@robo_neojetsamApr 07.2005 — i totally agree with you fang...
Copy linkTweet thisAlerts:
@ranosbauthorApr 07.2005 — Go it!

Thanks to all...
Copy linkTweet thisAlerts:
@robo_neojetsamApr 07.2005 — anytime ? allways happy to help.
Copy linkTweet thisAlerts:
@vietadamMay 11.2005 — What if I do want to preload all images on the page, even the ones that will be initially loaded OR just be able to define their sources at the beginning of the page.

I work through ebay and I am constantly changing images names and some are like 167a, 167b, 167c... and so forth, i've found a way to script the production of the names, but i don't know of a way to make the :

<img src="XXXXa.jpg"> be defined at the beginning of the page..

rather than go through the code each time to change each image name for every item.

any help will be greatly appreciated.
Copy linkTweet thisAlerts:
@robo_neojetsamMay 12.2005 — so cant help u there
×

Success!

Help @ranosb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...