如何为Google App Engine(Java版本)提供的静态资源启用Last-Modified标头? [英] how to enable Last-Modified header for static resources served by Google App Engine (Java version)?

查看:124
本文介绍了如何为Google App Engine(Java版本)提供的静态资源启用Last-Modified标头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为Google App Engine提供的静态资源打开 Last-Modified 标头?如果 Last-Modified 日期表明它是较新的,我有一个大的zip文件,我的应用程序可以提供给iPhone客户端应用程序,并且我只想下载它。而不是iPhone上的缓存副本。

PS:我使用的是Google App Engine的Java版本。

解决方案:我最终编写了一个简单的web应用程序来提供我自己的静态资源。不难做到。为了使App Engine能够提供静态文件,需要做一些小配置步骤,这些步骤记录在 here

解决方案

不幸的是,App Engine目前似乎不支持条件获取静态资源。您可能希望在此处提出有关该问题的错误。


Is there a way to turn on the Last-Modified header for static resources served up by Google App Engine? I have a large zip file that my app serves up to an iPhone client app, and I'd like to only download it if the Last-Modified date indicates that it is newer than the cached copy on the iPhone.

PS: I am using the Java version of Google App Engine.

Solution: I ended up writing a simple webapp to serve up my own static resources. Not hard to do. There is a small configuration step I had to do to get App Engine to serve static files, which is documented here.

解决方案

Unfortunately, App Engine doesn't currently appear to support conditional gets for static resources. You might want to file a bug here about that.

这篇关于如何为Google App Engine(Java版本)提供的静态资源启用Last-Modified标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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