M
M
magary42017-04-05 17:06:36
JavaScript
magary4, 2017-04-05 17:06:36

Cache problem after login?

I open the main page
, log in to the popup and load the page, the
page loads with headers

Age:х
Cache-Control:public, s-maxage=60

at the first opening, Age is 0. I log in there, judging by the overload Age is 20
, respectively, I see the page as at the first opening - as if not logged in (no welcome) the browser, as I understand it, didn’t redraw anything, but took everything from the cache
, then I do F5 several times and the Age heading grows and I keep seeing the old page
and only when it reaches 60 - the browser shows me the page that should be (with a welcome to the logged in user) and Age is set to 0
how to fix this?
within 60 seconds php code is not called at all. Apache gives the page from the
PS cache. maybe document.location.reload() can be done hardcoded by ignoring the headers? this will fit too

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2017-04-05
@Stalker_RED

location.reload(true);
https://developer.mozilla.org/ru/docs/Web/API/Loca...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question