php - Manipulate response via controller to force no cache -
i have zf2 php app , want page never put in cache , force browser new 1 each time.
first : how manipulate response through controller (zf 2.4) ? search fall on older version, 1.x , one. maybe miss thing.
second : have advice 'browser never cache' manipulation ? on php.net lot of solution in pure php, maybe know way zf2.
thanks, have nice day
you can access headers through response object follows controller action:
$this->getresponse()->getheaders()->addheaderline('cache-control: no-store, no-cache, must-revalidate, max-age=0')
Comments
Post a Comment