Forums

[Plugin: WP Super Cache] HTTP_PROFILE? (7 posts)

  1. citypaper
    Member
    Posted 3 weeks ago #

    The caching is not picking up certain mobile devices in the htaccess directives because it needs to detect the $_SERVER['HTTP_PROFILE'] variable.

    There does not seem to be a way to do this in the .htaccess, is there a place in the SuperCache code to add this detection?

  2. donncha
    Member
    Posted 3 weeks ago #

    What is the HTTP_PROFILE set to? I haven't ever come across it. Is there any overlap between clients that trigger that variable and the mobile user agents that the plugin detects?

  3. citypaper
    Member
    Posted 3 weeks ago #

    HTTP_PROFILE and HTTP_X_WAP_PROFILE are two server variables than can be set by mobile devices. If one is present it is a mobile browser.

    Works well with this function:
    http://detectmobilebrowsers.mobi/

    But since SuperCache is leaning on the .htaccess for detection it is missing it.

    My blackberry is sending the user agent as Firefox, so supercache by passes it as mobile. But the function linked to above detects it as mobile because it searches for the two server variables I mentioned.

    I'm looking but having a surprisingly hard time finding documentation on these variables, but they definitely are there.

  4. citypaper
    Member
    Posted 3 weeks ago #

    Just looking at some of the SuperCache code it seems there is a place for this detection to be added, but I'll defer to an expert for now.

  5. donncha
    Member
    Posted 3 weeks ago #

    Unfortunately I don't want to look at the code on that site as it's for non commercial use and not compatible with the GPL. Are those variables set to anything specific or just set to 1 when you visit with a mobile client?

    You'll need to look in your .htaccess and wp-cache-phase1.php for the mobile code. No idea if you can check for those variables in mod_rewrite rules however.

  6. citypaper
    Member
    Posted 3 weeks ago #

    There are ways to do it by hacking those variables in, but really I think I had my .htaccess order wrong. It was working in my MU blog, but not single install, so a little examination and it seems to be all good.

  7. citypaper
    Member
    Posted 3 weeks ago #

    Nope. Scratch that. Not working. Having a weird back and forth.

Reply

You must log in to post.

About this Topic