Answer the question
In order to leave comments, you need to log in
How to disable page caching?
I have a page for adding an article, available only to an authorized user, but if you log in, go to this page, then click on the exit button, here is its code:
router.get('/logout', (req, res) => {
if(req.session) {
req.session.destroy(() => {
res.redirect('/');
})
} else {
res.redirect('/');
}
})
Answer the question
In order to leave comments, you need to log in
What's wrong with a cached page with old data locally in the browser?
Now, if requests go away when you return back and they work, then there is a jamb on the backend in the authorization check.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question