I’m currently using Zend Framework and for some of the actions in various controllers it has the pragmas set for no-cache. Some of them use metatags for this and others set the headers. Is it better to set it in the headers or in the metatags? Which is a browser more apt to listen to?
I’m currently using Zend Framework and for some of the actions in various controllers
Share
HTML Meta Tags are easy to use but usually not very effective. HTTP headers give you a lot of control over how both browser caches and proxies handle your objects. Therefore, I would definitely recommend you to use HTTP headers instead of HTML Meta Tags.
Also notice that PHP Headers prevent for both proxies and browsers from caching page, as far as I know you can’t prevent proxies from caching page using HTML Meta Tags.
Another thing to take into consideration, from Microsoft Support:
So here is the way to go in your controllers:
$this->getResponse()->setHeader('Pragma', 'no-cache', true);You could even write a ressource plugin that does it for you in all of your pages.