Do browsers (IE and Firefox) parse linked javascript files every time the page refreshes?(浏览器(IE和Firefox)每次页面刷新时都会解析链接的javascript文件吗?)
They can cache the files, so I'm guessing they won't try to download them each time, but as each page is essentially separate, I expect them to tear down any old code and re-parse it.(他们可以缓存文件,因此我猜他们不会每次都尝试下载它们,但由于每个页面基本上是分开的,我希望它们可以拆除任何旧代码并重新解析它。)
This is inefficient, although perfectly understandable, but I wonder if modern browsers are clever enough to avoid the parsing step within sites.(这是低效的,虽然完全可以理解,但我想知道现代浏览器是否足够聪明以避免站点内的解析步骤。) I'm thinking of cases where a site uses a javascript library, like ExtJS or jQuery, etc.(我在想一个网站使用javascript库的情况,比如ExtJS或jQuery等。)
ask by translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…