0

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?

1 Answer 1

1

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:

<?php
  header("Cache-Control: max-age=15778463"); //6 months
?>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .