我们正在从.cache.html文件加载javascript,那么为什么我们不能从.js下载呢? [英] we are loading javascript from .cache.html file, then why we cant download it from .js?

查看:58
本文介绍了我们正在从.cache.html文件加载javascript,那么为什么我们不能从.js下载呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在学习gwt时,我在developers.google.com上看到了以下句子.

I saw the following sentences in developers.google.com while studying gwt.

"The "`cache`" files contain your application's logic. If you were to look inside a 
`.nocache.html` file, you would see that it is JavaScript code wrapped in a thin HTML
 wrapper.You might wonder why the `GWT` Compiler doesn't simply emit it as a JavaScript .js 
file. The reason for this is that certain browsers do not correctly handle compression of 
pure-JavaScript files in some circumstances. This would effectively mean that users 
unfortunate enough to be using such a browser would download the `.js` file uncompressed. "

我们正在从.cache.html文件加载javascript, 那为什么我们不能从.js下载呢?我认为现在所有支持javascript ..

we are loading javascript from .cache.html file, then why we cant download it from .js? i think now all browsers supporting javascript..

推荐答案

引用的语句似乎已经很清楚地说明了这一点:某些浏览器在某些情况下无法正确处理纯JavaScript文件的压缩" em>.关于支持JavaScript的不是不是,而是关于支持JavaScript文件的压缩的.

The statement quoted seems to have explained it quite clearly: "certain browsers do not correctly handle compression of pure-JavaScript files in some circumstances". It's not about supporting JavaScript, it's about supporting the compression of JavaScript files.

这篇关于我们正在从.cache.html文件加载javascript,那么为什么我们不能从.js下载呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆