Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<IMG/> LowSrc attribute + events?

< IMG SRC="pete.jpg" LOWSRC="pete2.jpg" WIDTH=364 HEIGHT=500>

(The low quality version, pete2.jpg, is 7,401 bytes. The high quality version, pete.jpg, is 48,952 bytes.)

I want to show first the lowsrc.

then after it finishes loading , start loading in the background the real src.

I want to display a progress bar meanwhile. but in order to hide/display the progress bar - i need 2 events.

when LOWSRC  load event -> show progress bar
when SRC   load event -> hide progress bar

how can i capture the LOAD event both for lowsrc && src

edit

ive tested this url

and fast-forwarded the pictures - and by fiddler i saw there are 2 images. one small and one big.

but this made me search and find the lowsrc attr.

which can also help here....

like image 783
Royi Namir Avatar asked Apr 29 '12 12:04

Royi Namir


1 Answers

According to various sources around the web, lowsrc is no longer supported by modern browsers. At least on Chrome 18 / Windows 7, it seems to get ignored completely.

It's never been part of HTML4, nor of HTML5, although supposedly it's still supported by Gecko browsers (I did not test this).

Your best bet is to use two images, like Flickr does.

like image 58
Thomas Avatar answered Sep 19 '22 11:09

Thomas