WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Possible to cache custom HTTP header? (5 posts)

  1. szemian
    Member
    Posted 1 year ago #

    My site need a custom HTTP header to function correctly. The HTTP header is added through add_action('wp', 'add_custom_header');

    When the page is being cached using WP Super Cache, my custom HTTP header is missing. Since WP Super Cache is adding extra HTTP header as well (WP-Super-Cache: Served supercache file from PHP), is it possible to include this custom HTTP header as well? The value of the header is not fixed, meaning it changes from post to post.

    Your feedback would be highly appreciated.

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Hubert Nguyen
    Member
    Posted 1 year ago #

    Szemian, I was wondering the same thing when I played with Varnish and wanted to add specific Varnish TTL.

    Hopefully Donncha will check this thread. I'm very interested by using WPSC but being able to tweak the headers...

  3. Bill Dennen
    Member
    Posted 1 year ago #

    did you ever find a solution for this one?

    thanks.

  4. Hubert Nguyen
    Member
    Posted 1 year ago #

    I found out a hook for it, but I haven't done any tests yet. Maybe you can find a plug-in that can help, based on this additional info: http://en.hetarena.com/archives/1

  5. Hubert Nguyen
    Member
    Posted 1 year ago #

    I revisited this issue since I am now using custom headers as well. As far I as know, WP-SuperCache will remove all the custom HTTP headers, so my only option is to disable it and let Varnish to the caching. In theory there is no need for WPSC when there's a Varnish front-end, but I was overly cautious I assume. I had to disable WPSC to use my custom HTTP headers.

    Also, I'm not sure if WPSC could save the headers on file -- maybe it could in PHP mode, but probably not in htaccess mode.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.