You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Jean Fiedler <J....@keyence.de> on 2010/12/21 08:35:38 UTC

Set Expire Header

Hi List,

is it possible  to set/overwrite the expire Header in ATS?

I would like to give all images a expire header of one week for a domain. Unfortunately i cannot set it directly on the origin server because it is maintained by a different company.

I did not find it in the manual.

But a mod rewrite thing like in Apache Webserver would be fine.


Best regards


Re: Set Expire Header

Posted by 魏晋 <we...@gmail.com>.
maybe you have to write a plugin, which rewrite the response header
before write into the cache.

2010/12/21 Jean Fiedler <J....@keyence.de>:
> I already tried to play around with that but ATS is not setting a Expire Header in the response.
>
> I want to reduce the requests by the clients. I want that the ATS will set a header that the file is 1 week valid and that the client does not need to request again.
>
> Actually the client is always asking if the file is still okay. ATS is answer 304 (Not modified). I want to minimize these stupid querys with the expire header because i know image files will not change that frequently.
>
> Should he set a expire header with the cache.config? I am not sure.
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: ming.zym@gmail.com [mailto:ming.zym@gmail.com]
> Gesendet: Dienstag, 21. Dezember 2010 09:32
> An: users@trafficserver.apache.org
> Betreff: Re: Set Expire Header
>
> will the cache control works for you?
> http://trafficserver.apache.org/docs/v2/admin/files.htm#cache.config
>
>
>
> 在 2010-12-21二的 07:35 +0000,Jean Fiedler写道:
>> Hi List,
>>
>>
>>
>> is it possible  to set/overwrite the expire Header in ATS?
>>
>>
>>
>> I would like to give all images a expire header of one week for a
>> domain. Unfortunately i cannot set it directly on the origin server
>> because it is maintained by a different company.
>>
>>
>>
>> I did not find it in the manual.
>>
>>
>>
>> But a mod rewrite thing like in Apache Webserver would be fine.
>>
>>
>>
>>
>>
>> Best regards
>>
>>
>>
>>
>
>
>

AW: Set Expire Header

Posted by Jean Fiedler <J....@keyence.de>.
I already tried to play around with that but ATS is not setting a Expire Header in the response.

I want to reduce the requests by the clients. I want that the ATS will set a header that the file is 1 week valid and that the client does not need to request again.

Actually the client is always asking if the file is still okay. ATS is answer 304 (Not modified). I want to minimize these stupid querys with the expire header because i know image files will not change that frequently.

Should he set a expire header with the cache.config? I am not sure.



-----Ursprüngliche Nachricht-----
Von: ming.zym@gmail.com [mailto:ming.zym@gmail.com] 
Gesendet: Dienstag, 21. Dezember 2010 09:32
An: users@trafficserver.apache.org
Betreff: Re: Set Expire Header

will the cache control works for you?
http://trafficserver.apache.org/docs/v2/admin/files.htm#cache.config



在 2010-12-21二的 07:35 +0000,Jean Fiedler写道:
> Hi List,
> 
>  
> 
> is it possible  to set/overwrite the expire Header in ATS?
> 
>  
> 
> I would like to give all images a expire header of one week for a 
> domain. Unfortunately i cannot set it directly on the origin server 
> because it is maintained by a different company.
> 
>  
> 
> I did not find it in the manual.
> 
>  
> 
> But a mod rewrite thing like in Apache Webserver would be fine.
> 
>  
> 
>  
> 
> Best regards
> 
>  
> 
> 



Re: Set Expire Header

Posted by "ming.zym@gmail.com" <mi...@gmail.com>.
will the cache control works for you?
http://trafficserver.apache.org/docs/v2/admin/files.htm#cache.config



在 2010-12-21二的 07:35 +0000,Jean Fiedler写道:
> Hi List,
> 
>  
> 
> is it possible  to set/overwrite the expire Header in ATS?
> 
>  
> 
> I would like to give all images a expire header of one week for a
> domain. Unfortunately i cannot set it directly on the origin server
> because it is maintained by a different company.
> 
>  
> 
> I did not find it in the manual.
> 
>  
> 
> But a mod rewrite thing like in Apache Webserver would be fine.
> 
>  
> 
>  
> 
> Best regards
> 
>  
> 
>