gpt4 book ai didi

javascript - 我们正在从 .cache.html 文件加载 javascript,那么为什么我们不能从 .js 下载它呢?

转载 作者:行者123 更新时间:2023-11-28 02:35:14 24 4
gpt4 key购买 nike

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

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

最佳答案

引用的声明似乎已经非常清楚地解释了这一点:“某些浏览器在某些情况下无法正确处理纯 JavaScript 文件的压缩”。它不是支持 JavaScript,而是支持 JavaScript 文件的压缩。

关于javascript - 我们正在从 .cache.html 文件加载 javascript,那么为什么我们不能从 .js 下载它呢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13560137/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com