Need to add expires header conditionally based on mime types

Silver Moon m00n.silv3r at gmail.com
Fri Jun 14 03:12:05 UTC 2013


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 <hostdl at gmail.com> 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
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
Silver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130614/a12b4068/attachment.html>


More information about the nginx mailing list