>From what you describe I do think the suggested nginx config is enough...

However maybe you're looking for something like this:

http://stackoverflow.com/questions/14631044/expires-header-based-on-dynamic-content-type-in-nginx

Not really sure if it suits you're needs, but It seems this is what
you're looking for.

You can also find more info on mime type here:
http://wiki.nginx.org/HttpCoreModule#types

Hope this helps,

Mike


On 06/14/13 03:12, Silver Moon wrote:
> yes, i could send out headers from php itself
> but mime based header generation in the webserver itself would make
> things easier.
>
> so finally it is impossible to achieve that ?
>
> On Fri, Jun 14, 2013 at 8:35 AM, Host DL <[email protected]
> <mailto:[email protected]>> wrote:
>
>     If you handle your js, css and images by php scripts you can use
>     header function to send out Expires and Cache-Control directives
>
>     example:
>
>     <?php
>     header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
>     header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
>     ?>
>
>     _______________________________________________
>     nginx mailing list
>     [email protected] <mailto:[email protected]>
>     http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
>
> -- 
> Silver
>
>
> _______________________________________________
> nginx mailing list
> [email protected]
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to