/    Sign up×
Community /Pin to ProfileBookmark

How to order which items to load?

I’m pretty sure there is a code that lets you specify which order you would like items to load in (for example, you want the entire webpage to load and once its loaded, a video on the webpage will begin to load), but I can’t remember how to do it. Any help would be greatly appreciated. Thanks!

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Mar 28.2007 — You can try to do that with an onload handler for the body but it's flaky at best.
Copy linkTweet thisAlerts:
@the_treeMar 29.2007 — Generally, if it appears earlier in the markup it will be loaded earlier. Some browsers seem to load background images and style sheets before embedded content as well.

Onload handlers are one hell of an unreliable method, but if you want a try then google for "javascript image preloader tutorial"
Copy linkTweet thisAlerts:
@AthenaJellicleauthorMar 30.2007 — Hmmm...well, thank you so much for your input. I'll try to rearrange my code so the item will appear later. The onload handler seems to risky for a professional website.

Thanks again
×

Success!

Help @AthenaJellicle 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.13,
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,
)...