On Tue, Jun 14, 2011 at 4:50 PM, Konstantin Breu
<[email protected]> wrote:
> as the speculative parsing (and downloading of found linked resources) takes
> place before the DOM is loaded, it would be too late to call
>  document.execCommand("Stop") at DOMContentLoaded.

I am not saying that using ".stop()" is the best method to achieve
what the OP asked, just suggesting that an IE equivalent approach
exist and is documented on Microsoft sites.

Also, I believe it doesn't matter if the speculative parser download
the resource beforehand. In those cases the browser decide, we don't
have a choice on how to handle it differently.

> I would also ask about
> the side effects of that call to components in the page. For me using
> document.execCommand("Stop") in this case is more a hack, and I doubt it
> works regarding the downloads done at speculative parsing...

Can't say. I haven't used it. I just know it exists and should behave
as in other browsers of the same age.

> For the issue
> I've used an implementation similar to the Google impl and it works quite
> fine. For many images in the page it is important to have a fast viewport
> checker. The implementation of the jquery example in the first post
> (http://www.appelsiini.net/projects/lazyload) is maybe too slow for large
> and complex pages.
>

In all new browsers, even on IE9, mutation event for node inserted
exists, I would probably have a try with that too and see the outcome.

The main objective is an hack itself over browsers generic
optimizations, to achieve that I bet there are no "clean" ways, not
for Javascript anyway ;-)

--
Diego


>
> Am 14.06.2011 16:01, schrieb Diego Perini:
>>
>> On Tue, Jun 14, 2011 at 10:13 AM, Dmitry Pashkevich<[email protected]>
>>  wrote:
>>>
>>> Just a little observation. Looks like Google is also using the 'data-src
>>> approach' in their image search, where the<img>  tag is initially
>>> generated
>>> without the src attribute while its real source is stored in the data-src
>>> attribute and is used when the user scrolls to that image.
>>>
>>> window.stop() isn't the solution because you can't really catch the
>>> necessary moment for calling it and also it doesn't work in all browsers.
>>>
>> For cross-browser functionality, you can achieve the same behavior on
>> IE browsers by using:
>>
>>     document.execCommand("Stop");
>>
>> and regarding the exact moment this should be executed I believe it
>> should be at "DOMContentLoaded", when the HTML source has been
>> completely loaded.
>>
>>
>> --
>> Diego Perini
>>
>>
>>> --
>>> To view archived discussions from the original JSMentors Mailman list:
>>> http://www.mail-archive.com/[email protected]/
>>>
>>> To search via a non-Google archive, visit here:
>>> http://www.mail-archive.com/[email protected]/
>>>
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>>
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to