Webpage Expired $ _SESSIONS in PHP

In my web application I use $_SESSIONS, but sometimes, when users press the backspace key, it gets:

Webpage Expired

message.

Why is this happening? What can I do to avoid this?

+3
source share
3 answers

It also relates to cache management directives sent to the browser. Take a look at http://de.php.net/manual/en/session.configuration.php#ini.session.cache-limiter and http://shiflett.org/articles/how-to-avoid-page-has- expired-warnings to learn more about cache settings.

http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings:

Recap

" ", session.cache_limiter , , POST, , URL-.

+2

$_SESSION, POST. , GET POST.

+6

, , POST. , , POST GET, .

However, you can combine the two: let the request be POST, but it will return a redirect to the location header, which the browser will execute as GET. For the user, this will look like one operation, but in the browser it will be POST and then GET, which effectively fixes this problem.

+2
source

Source: https://habr.com/ru/post/1707201/


All Articles