> 确实是个问题。用 django 来处理静态文件不太好。不过一般 js 和 css 都只下载一次,以后都是 304 Not modified 了吧。
> 2012/11/7 ma siqi <mas...@gmail.com>
>> 不合理啊,JS或者CSS怎么办?也用django处理一遍
>> 在 2012年11月7日 下午5:04,Shuai Lin <linshuai2...@gmail.com>写道:
>> 如果用 django,压缩可以加一个 'django.middleware.gzip.GZipMiddleware' 就能解决。其他的框架应该也不难
>>> 2012/11/7 ma siqi <mas...@gmail.com>
>>>> 大概2~3个月之前是支持的啊,后来为什么取消了?什么时候支持?
>>>> 在 2012年11月7日 下午5:00,Alan Chan <chanfung...@gmail.com>写道:
>>>> python runtime的config.yaml配置参见:
>>>>> http://appstack.sinaapp.com/static/doc/release/testing/runtime.html#id4
>>>>> rewrite不支持,压缩目前不支持。
>>>>> On Wed, Nov 7, 2012 at 4:55 PM, 马思奇 <mas...@gmail.com> wrote:
>>>>>> 配了这些:
>>>>>> handle:
>>>>>> - expire: if( path ~ "/media" ) time 864000
>>>>>> - expire: if( path ~ "media/ico/favicon.ico" ) time 8640000
>>>>>> - compress: if ( out_header["Content-type"]=="application/json" )
>>>>>> compress
>>>>>> - compress: if ( out_header["Content-type"]=="text/html" ) compress
>>>>>> - compress: if ( out_header["Content-Length"]>=4096 ) compress
>>>>>> - rewrite: if ( !is_dir() && !is_file() && path ~ "favicon.ico" )
>>>>>> goto "media/ico/favicon.ico"
>>>>>> - rewrite: if ( !is_dir() && !is_file() && path ~ "/robots.txt" )
>>>>>> goto "/static/robots.txt"
>>>>>> - rewrite: if ( !is_dir() && !is_file() && path ~
>>>>>> "/weblukerverif.html" ) goto "/static/weblukerverif.html"
>>>>>> - rewrite: if ( !is_dir() && !is_file() && path ~
>>>>>> "/googleca5f2e917b27f580.html" ) goto "/static/googleca5f2e917b27f580.html"
>>>>>> - rewrite: if ( !is_dir() && !is_file() && path ~ "/bdsitemap.txt" )
>>>>>> goto "/static/bdsitemap.txt"
>>>>>> 之前是正常的,不知道从什么时候开始不起作用了...
>>>>>> --
>>>>>> 邮件来自: SAE Python 邮件列表
>>>>>> 发言: sae-python@googlegroups.com
>>>>>> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)
>>>>> --
>>>>> 邮件来自: SAE Python 邮件列表
>>>>> 发言: sae-python@googlegroups.com
>>>>> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)
>>>> --
>>>> 邮件来自: SAE Python 邮件列表
>>>> 发言: sae-python@googlegroups.com
>>>> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)
>>> --
>>> 邮件来自: SAE Python 邮件列表
>>> 发言: sae-python@googlegroups.com
>>> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)
>> --
>> 邮件来自: SAE Python 邮件列表
>> 发言: sae-python@googlegroups.com
>> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)
> --
> 邮件来自: SAE Python 邮件列表
> 发言: sae-python@googlegroups.com
> 退订: sae-python+unsubscribe@googlegroups.com (向此发空信即退!)