A button is clicked on a page, the form is submitted and when the response comes back, a pop-up is opened using onload function.
The problem is that the pop-up is also opened when coming back to the page using the back button.
Any neat way this can be handled?
posted 6 years ago
The only way is to set a session cookie saying that the pop up was opened.
When I have this server side code (no explicit cache-control whatsoever oon the page) and I hit the back button I get 'Page Expired' error.
When I comment this piece out, the page opens with a popup.
What difference just adding a cookie (and never reading it) could make?