Ok, that's what I thought; the html is loaded, but not yet all the
images.. so with the domready I kill the process.
But I do see 300+ requests to the images (and thus, it takes a long
time for the page to load). I should maybe put up some test page...


On Oct 29, 6:20 am, Ryan Florence <[email protected]> wrote:
> domready just means the html is loaded, it doesn't care about rendered  
> image sizes.
>
> Ryan Florence
>
> [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> On Oct 28, 2009, at 4:51 PM, Mikhail Korobov wrote:
>
>
>
>
>
> > No, domready means that DOM is ready and images are rendered. For
> > example, browser have to download image to set it's width and height
> > and DOM can't be ready until widths and heights of all elements are
> > set.
>
> > I think you should hide images using css and show them after loading.
> > There also should be some graceful degradation plan for users without
> > js, maybe putting all images in <noscript> in visible state or
> > something like that.
>
> > On 29 окт, 02:21, Rolf -nl <[email protected]> wrote:
> >> Hello,
>
> >> I wonder if these lazyload scripts that target images work really?!
> >> For example, I have a page with 300 images. I pull the filenames  
> >> out a
> >> database and put them all on the screen.
> >> I have a domready function that collects all images and set their src
> >> to a spacer.gif
> >> When I then look at the Net > Images tab in Firebug, I still see 300
> >> requests to those (original) images and it takes an awful lot of time
> >> to load the page.
> >> In the end the images are replaced on screen with the spacer gif, but
> >> I didn't win much time here.
>
> >> At first I wondered if it was my php script that made a thumbnail of
> >> the original image which for outputted (e.g. <img src="image.php?
> >> file=blabla.jpg&size=....), but when I left that out and set the
> >> original image file as src, it didn't make any difference.
>
> >> Ehmm, am I missing something here or..? I was expecting that domready
> >> event that replaced img.src with the spacer would prevent or cut off
> >> the loading of the original image...

Reply via email to