Support » Plugin: W3 Total Cache » Stop W3 Total Cache returning 304 Not Modified status?

  • aaceuk


    We are trying to find a way of preventing pages from returning 304 Not Modified status codes when W3 Total Cache is in use.

    We are using a custom theme with a header that contains user profile data, with logout links etc.

    We have Page Caching turned off for logged in users, because the header bar of pages is different for each individual user.

    When you log out and browse to a page that you visited whilst logged in, WordPress is sending a “304 Not Modified” HTTP status. The browser sees that status and shows the same page as it did last time. BUT last time you were logged in, and now you’re not, so the incorrect page is being shown.

    We’ve tried getting around it by setting the Cache Control policy to “no-cache”, and to set an immediate expiry date/time, but it seems some browsers, particularly Chrome, prioritise the 304 Not Modified status over these headers, and they have no effect.

    The only thing that has worked has been to deactivate the W3 Total Cache plugin entirely. Just deactivating the Browser Cache section of the plugin doesn’t work, you still get the 304 status.

    Please can you suggest how we can stop this type of browser caching but keep page caching enabled?


  • The topic ‘Stop W3 Total Cache returning 304 Not Modified status?’ is closed to new replies.