joined:May 21, 2004
I recently came upon a situation where I was using php and ajax to open a 'modal' after button click. I could not for the life of me understand why the dynamic content inside the modal was not updating after the first time it was clicked.
My htaccess had :
ExpiresDefault "access plus 2 days"
Header append Cache-Control "private, must-revalidate"
I changed this to the following and now all was fine :
ExpiresDefault "access plus 0 seconds"
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"
Header set Pragma "no-cache"
I had looked up some information on proper 'nocache' settings and did a simple copy paste.
This, however, bought up the question... what is the difference between 'Header set' and 'Header append'?
From a working standpoint I see no difference. I changed new code to append and it worked fine. I have used append in these rules for years not thinking twice until now. I did some searching and didn't come across much.
What is the difference between these two? Logic of course says one is appended (added to the end), but what is the real difference here?