Say you got a page that changes maybe twice a year, like a Contact page, but does have a custom CMS behind it and is written in PHP/Laravel. Is it possible to serve this from the cliënt side cache so that the network usage stays at minimum. With Varnish or a module alike?


Varnish will run in front of your application, receive all the requests, respond what it already has in cache and forward the others to your application server. So it cannot be used as you need.

The only thing that runs on the client side is the browser. So it is possible to do that on it using Cache-Control headers.

In the scenario you have described you could set your page header using PHP this way:

  header("Cache-Control: max-age=15778463"); //6 months
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.