⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

change text value before add_action executed



mbaleani
  • profile picture
  • Member

Posted 23 October 2017 - 21:05 PM

I have a flexigrid view with an add_action button. In the footer of the view, I count how many times user push this button. If the user pushes the button, I load a custom form. Suppose the user pushed the button twice. Then, if he push the button again I will show 3 times in my new view. But if the user uses the back button in browser, the footer will show twice again.

So I think that if I could change footer once the user push the button and before he leaves the grid, then when he goes back in history the footer will display the write value. Is there any way I can do it??


Amit Shah
  • profile picture
  • Member

Posted 24 October 2017 - 04:49 AM

well this have to do a lot with browser caching - try to expire the browser cache for the page immediately.. and that may resolve your problem.. so even though a user hits a back button .. since the cache have expired - it will pull up a fresh page from the server

 

Happy GCing :)


mbaleani
  • profile picture
  • Member

Posted 24 October 2017 - 21:14 PM

Genious!!! It worked  :D

 

I add to my view:

 

<?php
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.
?> 
 
Thank you very much!