Delete a header in PHP

Posted by Boldewyn on Stack Overflow See other posts from Stack Overflow or by Boldewyn
Published on 2010-04-03T17:56:42Z Indexed on 2010/04/03 18:03 UTC
Read the original article Hit count: 367

Filed under:
|
|
|

To allow caching a PHP generated file, I want to make sure, that the 'Pragma: no-cache' header is not set. However, how do I delete a possibly already set header?

That is, it could be possible, that somewhere in the code someone wrote header('Pragma: no-cache'); and now I want to make sure, the header is not sent.

Is it sufficient to do this:

header('Pragma:');

or is there something like delete_header() (which would, apparently, be undocumented or well-hidden)?

© Stack Overflow or respective owner

Related posts about php

Related posts about header