Support » Plugins » [Plugin: WP Super Cache] Start Page and Rejected User Agent

  • Hi Donncha,

    I have mobile Support turned off, and rejected the iPhone User Agent. The Rewrite Rules are turned off(only wordpress active).

    But the WP Super Cache Plugin caches the Home Page of the site(via PHP). All other pages are shown correctly, without caching on the iPhone.

    Is this only mine, or a general Problem?

    Best Regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Now all files of the rejected user Agent were cached by WPCache. This is what I got in the DEBUG-Logs:

    20:32:53 /permallink/to/post supercache dir: /srv/www/mydomain/wp-content/cache/supercache/
    20:32:53 /permallink/to/post supercache dir: /srv/www/mydomain/wp-content/cache/supercache/
    20:32:53 /permallink/to/post Served page from supercache file using PHP.
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 supercache dir: /srv/www/mydomain/wp-content/cache/supercache/
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 supercache dir: /srv/www/mydomain/wp-content/cache/supercache/
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 No wp-cache file exists. Must generate a new one.
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 In WP Cache Phase 2
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 Setting up WordPress actions
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 Supercache caching disabled. Only using wp-cache. Non empty GET request.
    20:32:55 /wp-content/plugins/wp-postviews/wp-postviews.php?_=1294605174943&postviews_id=157361 URI rejected. Not Caching

    First the WP-Cache Files are Files where I can see the mobile view, then the cached files are files where I can see the Desktop view.

    Can you explain me why the rejected User Agents are cached with WP Cache, and why I can stop that?

    And another general Question: When is the supercache used, when the WP-Cache?

    The rejected user agent field only stops pages from being cached by those browsers. Unfortunately it doesn’t stop them being served to them.

    I am going to put a check in (when serving a cached page) but it won’t work if you’re using the mod_rewrite rules as PHP isn’t run at all.

    Well, that wasn’t too hard. Grab and place it in your Supercache plugin directory.

    You’ll have to clear your cache to see the changes but it will now remember up to 30 urls (don’t want it eating up all our memory) and serve repeating urls on that list from the same hostname.

    Oops, answered the wrong thread above.

    I’m using nginx as the webserver. The Mobile bowser are redirected directly to wordpress, an extra rule doesn’t serve these via mod rewrite.

    The actual problem ist when I’ve rejected these user agent in supercache they will be cached with WP_Cache. I’m happy if you can modify this in a newer version.

    I solved the problem, i edited the $_SERVER[‘HTTP_HOST’], made a global variable and set in the config the host, what depends on the user agent.

    Then I wrote some special rewrite rules what redirect the specific user agents to the correct supercache Folder.

    But I’ve one question: I’ve seen that there were build some non supercache(wp-cache-xxxx.html) files in my wp-content/cache directory.

    What are these files, when were they build, because were they build shouldn’t they are all supercache files?

    PS: YES, I’ve mobile support turned off 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Super Cache] Start Page and Rejected User Agent’ is closed to new replies.