带有清单的 GWT 在第二次加载时未按预期工作
我浪费了 2 天的时间试图理解为什么我的清单无法在 Eclipse 中使用 GWT 工作。其实答案就在问题里。由于某些原因,GWT 的 Jetty 无法与 html5 清单配合良好。
第一次运行时,您可以看到浏览器很好地下载每个图像/资源,但是...如果您更新文件夹中的图像,更新清单并重新加载页面..这根本不起作用!旧图像仍然出现。
查看日志,您可以看到图像已再次下载,但仅此而已。没有办法到达它。
我在尝试使用 swapCache 和侦听器时惨遭失败,但实际上没有必要,因为当我将它部署在 tomcat 安装中时......神奇!成功了!
我偷偷怀疑嵌入式码头正在缓存图像,而不是真正检查它是否已更改。你知道如何在 GWT 的 Jetty 中解决这个问题吗?
干杯。
I've wasted 2 days trying to understand why my manifest was not working using GWT in Eclipse. Actually, the answer was in the question. For some reasons, GWT's Jetty is not working well with html5 manifest.
On the first run, you can see the browser downloading every image/resource nicely but... if you update an image in a folder, update the manifest and you reload the page.. that doesn't work whatsoever! The old image still appears.
Looking at the log, you can see that the image has been downloaded again but that's it. No way to get to it.
I miserably failed trying to use swapCache and listeners but actually there is no need for because when I deployed it in a tomcat installation... magic ! It WORKED !
I have a sneaky suspicion that the embedded jetty is caching the image and not really checking if it has changed. Do you know how to fix that in GWT's Jetty ?
Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用嵌入式 Jetty 服务器时,Google Plugin for Eclipse 需要手动通知更改,它无法自动检测更改的资源。要通知插件需要检查更改,请单击下图中突出显示的按钮。
The Google Plugin for Eclipse needs to be notified manually of changes when using the embedded Jetty server, it cannot detect changed resources automatically. To inform the plugin that it needs to check for changes click the button highlighted in the following image.