Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

NadeemAkhter's avatar

page reload on browser back button.

I need to somehow detect that the user has pressed a browsers back button and reload the page.because i show cart count on that page if the page is not reload or refresh cart count not updated.

0 likes
2 replies
rezafm's avatar

This is an old Thread, but it can be easily solved on the server by setting Content Cache to "no-store" for dynamic pages like PHP. After reloading the web server, it will also refresh on back button.

Please or to participate in this conversation.