T
T
TheInvisible2015-10-03 18:06:10
PHP
TheInvisible, 2015-10-03 18:06:10

Caching a site (catalog) when switching to a product, and returning back to the catalog using the “back” button in the browser, how to do it right?

There is a website, a catalog with goods.
The structure is like this:

  1. / catalog /1,
  2. / catalogue /100,
  3. / catalog /200/?param=new etc.

Clicking on any product opens a new page with the product.
When you click on the back button in the browser, the user returns to the previous page and is loaded again on a new directory (page), although it has not changed since the last visit.
Question: It is possible to cache all pages of the /catalog/* type for n-minutes, for example, for 5 minutes, for the user, which he walked for convenient, quick navigation. How to do it right?
Page header data:
Cache-Control:"no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
Connection:"keep-alive"
Pragma:"no-cache"
Server: "nginx/1.6.2"
Transfer-Encoding:"chunked"
X-Powered-By:"PHP/5.4.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Romanenko, 2015-10-03
@slimus

Have you read the Internet on this issue? Here is a habr, for example: habrahabr.ru/post/124684

B
bitaz, 2015-10-03
@bitaz

In the nginx site config:
expires 5m;
caches on the client side

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question