Krlos Posted September 13, 2018 Share Posted September 13, 2018 (edited) Hi, I have a page with a form for searching field data. After the results are shown I have a link to view details for every result match. Everything is working fine but after I click to view a detail and try to go back to the results page I get ERR_CACHE_MISS on Chrome and Firefox. I have been reading about this issue here The solutions posted is to add this headers to the page: header('Cache-Control: no cache'); How can I add this header to a template? Thank you Edited September 13, 2018 by Krlos Typo Link to comment Share on other sites More sharing options...
Soma Posted September 13, 2018 Share Posted September 13, 2018 You should not use "post" but "get" for a searchform. This way it's not trying to resubmit the form. The design pattern when using "post" for Forms usually is PRG https://en.wikipedia.org/wiki/Post/Redirect/Get 4 Link to comment Share on other sites More sharing options...
Krlos Posted September 13, 2018 Author Share Posted September 13, 2018 Thank you @Soma, you were absolutely right. Using get instead of post fixed my problem! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now