wp-admin area is cached (4 posts)

  1. rfair404
    Posted 4 years ago #

    When I go to Add new post (or page) I see the normal Add post screen, and when I save draft or publish the page, everything works fine. If I immediately try to add another new page I see the same add new screen ,however instead of adding a new post, it updates the previous post instead, basically erasing all the old content and title and overwriting it with the second post's content.

    I suspect that this is because my browser is somehow caching the pages, and is not re-validating properly. I captured the http headers using livehttpheaders for firefox and here is some of the header for the http://www.mysite.com/wp-admin/post.php request.

    'Cache-Control: max-age=1800, stale-if-error=3600
    Pragma: public'

    I am running Apache on this server, and have an external CDN caching all of the static images, css etc. Is there a simple Apache directive that will force the /wp-admin/ to use

    'Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache'

  2. rfair404
    Posted 4 years ago #

    forgot to add this: If I go to Add Post (the second time) then Ctrl+R (hard refresh) before I start writing, the post is added as expected.

  3. rfair404
    Posted 4 years ago #

    So I thought that it is important to note that I deactivated all plugins, changed to twentyten theme, and updated to the latest stable version of WordPress before posting this.

    Also I have wp running on my locahost and put all the wp files from our production server onto the local box. I imported the database and tried to replicate the issue. This problem does not exist on the localhost, only on the production server. I can't imagine this is a plugin related problem, or theme related. I can't see the apache config file because of my perms on the server.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    I've never come across wp-admin being cached in this way. I think you're right that it's a server config issue rather than a WP-specific one. We do have some server gurus around here but I've not seen any of them online in the last hour or so.

    Have you tried asking about this on a general Apache forum?

Topic Closed

This topic has been closed to new replies.

About this Topic