review htaccess and see if I have it right (2 posts)

  1. cicindy9
    Posted 2 years ago #

    Hi, I'm new and this is my first post as well as first question. I am not web designer by any stretch of imagination. I'm more of a connect the dots kind of person. Visual aids are always best.
    I started using word press as a website (not a blog)about a year ago. My site is http://www.kingsransomenglishmastiffs.com
    I really only use it to have a place to send potential puppy buyers. But still if I'm gonna use it, then I might as well try to do it right.
    My problem is with google page speed. The first thing it tells me is defer parsing of javascript, and gives me this list.
    http://static.ak.fbcdn.net/rsrc.php/v2/yU/r/jlg9d7HhVQ1.js (99.4KiB)
    http://static.ak.fbcdn.net/rsrc.php/v2/ys/r/L0OIUBrvg93.js (90.6KiB)
    http://www.kingsransomenglishmastiffs.com/.../?... (88.5KiB)
    http://static.ak.fbcdn.net/rsrc.php/v2/yl/r/SgNfhSw_SOo.js (64.5KiB)
    http://static.ak.fbcdn.net/rsrc.php/v2/yl/r/GqLzR9PwXc2.js (45.4KiB)
    http://platform.twitter.com/.../follow_button.1352365724.html (33.3KiB of inline JavaScript)
    http://static.ak.facebook.com/.../xd_arbiter.php?... (21.5KiB of inline JavaScript)
    https://s-static.ak.facebook.com/.../xd_arbiter.php?... (21.5KiB of inline JavaScript)
    http://www.facebook.com/.../likebox.php?... (2.9KiB of inline JavaScript)
    http://www.kingsransomenglishmastiffs.com/ (670B of inline JavaScript)

    Then, what I'm really working on right now is:
    Leverage Browser Caching

    and Specify a cache validator.
    http://shield.sitelock.com/.../kingsransomenglishmastiffs.com (expiration not specified)
    http://connect.facebook.net/en_US/all.js (17.9 minutes)
    http://platform.twitter.com/widgets.js (30 minutes)

    I thought I had both fixed in htaccess, but quess not. Here is my .htacess code:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access 2 days"
    ## EXPIRES CACHING ### Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    # BEGIN Cache-Control Headers
    <ifModule mod_headers.c>
      <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "public"
      <filesMatch "\.(css)$">
        Header set Cache-Control "public"
      <filesMatch "\.(js)$">
        Header set Cache-Control "private"
      <filesMatch "\.(x?html?|php)$">
        Header set Cache-Control "private, must-revalidate"
    # END Cache-Control Headers
    # BEGIN Turn ETags Off
    FileETag None
    # END Turn ETags Off
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f

    Do I have things in the wrong order, wrong place, ???
    As far as w3totalcache, it breaks my site, so I really don't want to try that again.

  2. noahjonah
    Posted 2 years ago #

    I've found that using a few plugins instead of w3totalcache can work well.

Topic Closed

This topic has been closed to new replies.

About this Topic