WordPress.org

Ready to get started?Download WordPress

Forums

admin.php -> What does the header('X') do? (4 posts)

  1. davidjg
    Member
    Posted 8 years ago #

    header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-cache, must-revalidate, max-age=0');
    header('Pragma: no-cache');

    What do these do? I had a problem with a plugin, and apparently these lines were causing trouble. If I edit them out, does it greatly affect anything?

    Many thanks for your help.

  2. Firas
    Member
    Posted 8 years ago #

    Sends HTTP headers. I think those ones in effect tell the browser and intermediary proxies to not cache the page at all.

  3. davidjg
    Member
    Posted 8 years ago #

    Woah! Obviously important. Tried commenting them out, everything seemed fine.

    Then, logged out and everything went pfft.

    So don't bother answering my question - sorry for wasting time.

  4. jalenack
    Member
    Posted 8 years ago #

    I'll just add a bit to what Firas said. This code is added when the page is very dynamic and the user should always load it from the server instead of from their caches. So no, editing them out won't cause any harm. I'm curious, what plugin did this, and what was the context etc.?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags