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 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... 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.
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]