WordPress.org

Ready to get started?Download WordPress

Forums

WP Retina 2x
[resolved] Retina htaccess SEO Improvement (8 posts)

  1. Robert Chapin
    Member
    Posted 1 year ago #

    To further improve server performance and website SEO, the Retina RewriteRule in htaccess should be preceeded by the following condition or similar:

    RewriteCond %{HTTP:Cookie} devicePixelRatio [NC]

    This will prevent the PHP from controlling image requests for dumb clients and bots such as Google. That will reduce CPU time and also provide search engines with the Apache features such as If-Modified-Since.

    I might be able to help with any questions concerning mod_rewrite.

    http://wordpress.org/extend/plugins/wp-retina-2x/

  2. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    That's a very good remark. I will do some more testing (if it is really required?) and include this in the next version of the plugin, in about one month. Thanks a lot for this!!!!

  3. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Robert,

    I wondered if you had any idea how to add a RewriteCond using the WordPress API. I wanted to add what you proposed to the plugin today, but I can't find a straightforward method to do it.

    Thanks a lot for your help!

  4. Robert Chapin
    Member
    Posted 1 year ago #

    Actually I doubt it's possible in WP_Rewrite. Might not be worth hacking into this just for a performance tweak.

  5. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    So probably all I can to is to add this in the FAQ? And I will mention this post.

    To make sure: this line just has to be added before the one added by my plugin and it works, right?

  6. Robert Chapin
    Member
    Posted 1 year ago #

    That works, but anything inside the WP_Rewrite block is going to get deleted when the rules are flushed.

    Another way to go about this is to implement If-Modified-Since in the script so at least that functionality isn't lost.

  7. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, I will tell that to Jeremy Worboys, he is the one in charge of the server-method (which is Retina-Images). Let's see what he says.

  8. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.