Despite of doing it in each file type handler, is there any simple way to set default expiry date of all types of file, e.g. json, jpg, html, css, js, etc?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Nagi said, the
connection handlercalled/handlers/main.ccan be used to generate custom expiration HTTP headers.You can also use
content-type handlerswhich name in the/handlersdirectory must match the file type (html.c,json.c,jpg.c, etc.).By default, G-WAN generates HTTP headers which may help proxy servers to do their job:
But a more fine-grained strategy can be used. That could be done in a future version by defining those content-related expirations in
content-type handlers.Proof that a server is a living (customer-driven) creature: