vaadin cache.html 大小
在启动我的基于 Vaadin 的 Web 应用程序时,查看 Chrome 开发人员工具的“审核”选项卡,我惊讶地发现 cache.html 文件 > 4MB大!我认为 Vaadin 的运行时间最差也不过几百k。我需要启用 gzip 压缩,但仍然...这么大的文件怎么可能发送到浏览器?
Looking into Chrome Developer Tools' Audits tab when launching my Vaadin-based web application, I have been horrified to see that the cache.html file was > 4Mb big! I thought that Vaadin's runtime was at worst a few hundred k's. I need to enable gzip compression, but still... how is it even possible that such a huge file is meant to be sent to the browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
4MB太大了。确保您没有使用 GWT 的“草稿编译”,因为它会使生成的小部件集变得巨大。
正确的大小约为 400-600kB(未压缩)。大小取决于集合中包含哪些小部件。添加新的小部件会使其变大一些,而删除一些未使用的小部件会使其变小。实际的最小大小在 200-300kB 之间。
最重要的是您已在 HTTP 服务器上启用了 gzip 编码。这样,实际上只有 80kB 到 200kB 传输到浏览器。
另请参阅:http://vaadin.com/forum/-/message_boards/message/163146< /a>
4MB is too big. Make sure you are not using GWT's "draft compilation" as it makes the resulting widgetset huge.
The right size is around 400-600kB (uncompressed). The size depends on what widgets are included in the set. Adding new widgets makes it a little bigger while leaving out some unused widgets makes it smaller. Realistic minimum size is between 200-300kB.
Most important is that you have enabled the gzip encoding on you HTTP server. That way only 80kB to 200kB is actually transferred to the browser.
See also: http://vaadin.com/forum/-/message_boards/message/163146