- From: timeless <timeless@gmail.com>
- Date: Wed, 9 Feb 2011 11:02:29 +0200
On Wed, Feb 9, 2011 at 9:46 AM, Glenn Maynard <glenn at zewt.org> wrote: > - The "scripts in comments" hack would be unneeded. ?That's an unpleasant > hack, because it will both prevent browsers from caching compiled scripts, > and prevent scripts from being compiled in the background. ?Specifying a > bogus file type also has these problems. i don't think a script in comments prevents caching. in the end at some point someone sends a string to a js engine for execution the js engine is free to generate bytecode or native code, it's also free to recognize that it has already parsed that given string and has a copy of the corresponding bytecode/native code. as for compiling in the background, again, nothing prevents this, if you have idle cycles you're free to speculatively parse whatever you like. it might not be a great idea, but it isn't forbidden. as a quality of impl issue, an agent is free to recognize when a given site pulls things out of comments and note to itself (or its peers) in the future to speculatively parse comments for that site.
Received on Wednesday, 9 February 2011 01:02:29 UTC