- From: Andy Davies <dajdavies@gmail.com>
- Date: Wed, 19 Sep 2012 09:14:33 +0100
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: WHATWG List <whatwg@whatwg.org>
On 18 September 2012 07:54, Jonas Sicking <jonas@sicking.cc> wrote: > > There has been discussions about implementing a "noexec" attribute on > <script> which would just load the script but instead of evaluating it > as soon as it's available, simply fire the "load" event. There would > also be an additional .execute() function on the script which would > permit executing the script after it has been loaded. > > This has mostly been discussed in a performance context where people > has expressed interest in loading scripts, while only waiting to > execute it until needed in order to avoid the costs involved in > parsing and executing the script. > > So far Hixie hasn't been interested in putting this into the spec > though, due to, as I understand it, not being convinced that it's > needed from a performance point of view. > > I'd personally be interested to see it implemented since people > clearly do load scripts dynamically and it would seem common for such > scripts to have dependencies on each other, which means that you have > to be able to execute them in a certain order. > Thanks for the details... >From a performance point of view I'm encouraging my clients (and others are too) to load third-party content asynchronously and where possible after onload. I've seen big variations in download times from third-parties like Facebook and Twitter (measured using synthetic monitoring that generates waterfalls for each page load) and of course these affect when the onLoad event fires. Cheers Andy
Received on Wednesday, 19 September 2012 08:15:16 UTC