'How to resolve ERR_CACHE_MISS with PHP after using back button?

I have a page on my website that contains several sorting buttons.

I would like to avoid ERR_CACHE_MISS error in the eventuality that the user tries to click back after using them.

I tried this :

header('Cache-Control: no cache');

It works fine after one sort only, but it doesn't work after several sorts.

So I tried this :

header('Location: https://mywebsite.com/currentpage.php');

It doesn't work at all, but I'm not sure how to implement it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source