All pastes #473010 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-05 23:49 UTC
rendered paste body
// In order to send a file to the client using Content-Disposition, we have
// to remove no-cache and no-store because IE _ignores_ Content-Disposition
// if they're used.
// (IE7 lets you leave Cache-Control alone, requiring only that Pragma be
// cleared.  IE6 requires both)
function undoCachingHeaders() {
        Header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        Header('Pragma: IE is too broken to support Content-Disposition properly');
}