Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web Development
Expertise: Beginner
Apr 14, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Load order of graphic images

I'm concerned about the order in which images I use on a site are loaded. Specifically, I want to load certain images before others.

Any ideas?

There are three ways I can think of for tackling your problem:

  1. Since your browser reads an HTML file from top to bottom and opens the connections to call the images in the order the HTML is parsed, I recommend using ALIGN and VALIGN attributes to their fullest.

    So let's say that you wanted a graphic on the top left to be the last to load. What you would do at the very bottom of the file is call the image:

    <IMG SRC=&quot;last.gif&quot; ALIGN=LEFT VALIGN=TOP>
  2. You may also be able to fool the browser by using the LOWSRC tag where the image being called in the LOWSRC is really just a transparent GIF. <IMG SRC=&quot;last.gif&quot; LOWSRC=&quot;transparent.gif&quot;>
  3. Finally, I would also use file size to your advantage. For example, GIFs with the highest memory that do not dither will pop on the page only after it's completely loaded. I'd be interested in hearing which solution you choose, and to see it in use.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date