• I’d like to send some headers to the pages before they’re written out, ex:

    // Date in the past
    header(“Expires: Mon, 26 Jul 1997 05:00:00 GMT”);

    // always modified
    header(“Last-Modified: ” . gmdate(“D, d M Y H:i:s”) . ” GMT”);

    // HTTP/1.1
    header(“Cache-Control: no-store, no-cache, must-revalidate”);
    header(“Cache-Control: post-check=0, pre-check=0”, false);

    // HTTP/1.0
    header(“Pragma: no-cache”);

    I didn’t find any plugins to do this, so I was just going to put one together myself, but I’m not sure what hook to tie into in order to get it to write the headers before writing anything else. Is this possible? I’m on WordPress 1.5

Viewing 1 replies (of 1 total)
  • All plugins execute before any theme does.

    You don’t need to hook it to anything, just execute it in the script and wp will run it. Or you can hook to init.

Viewing 1 replies (of 1 total)
  • The topic ‘Sending Headers’ is closed to new replies.