想在客户端加载GWT应用程序的.cache.html文件

时间:2010-06-30 08:42:20

标签: html apache gwt

我想在客户端(浏览器)加载GWT应用程序的.cache.html文件

但是现在当我每次从服务器上下载.cache.html文件时,我都会在浏览器上加载我的应用程序

我不希望每次请求都下载它,因为它太重了

请建议我解决方案

由于

3 个答案:

答案 0 :(得分:2)

GWT文档包括example cache settings for .htaccess on Apache

<Files *.nocache.*>
  ExpiresDefault "access"
</Files>

<Files *.cache.*>
        ExpiresDefault "now plus 1 year"
</Files>

答案 1 :(得分:1)

您需要配置服务器以告知客户端缓存该文件。所有在文件名中都带有“缓存”的文件都应该这样配置。

答案 2 :(得分:1)

当你将apache作为tomcat的代理服务器时,它会变得有点棘手。 Here is how I am doing it