Viewing 4 replies - 1 through 4 (of 4 total)
  • WP Super Cache does only one (major) thing. Full-page caching. Everything else needs to be done using alternative plugins or methods. For example, to enable compression using mod_deflate on Apache, please see the example config at https://github.com/h5bp/server-configs-apache/blob/master/dist/.htaccess#L709-L774 . I hope that helps.

    Thread Starter monetxxx

    (@monetxxx)

    Hi Pothi!

    Thanks for your reply! it does help.

    After testing the entire example config, the results were pretty bad (putting the entire code with no modification). I still had 50% on PageSpeed Insights.

    I did some research and put together a few statements that got me up to to 73%. That’s the best I could do.

    I am attaching here the code I am using in case of any comments or if it could be useful to someone.

    Thanks for your help and have a good one.

    ***PLEASE BARE IN MIND I KNOW NOTHING – THIS WAS JUST TRIAL AND ERROR :-)***

    .httaccess BEFORE “# BEGIN WordPress”:

    ## EXPIRES CACHING ##

    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”

    ## EXPIRES CACHING ##

    ## Cache One year for image files ###

    # One year for image files
    <filesMatch “.(jpg|jpeg|png|gif|ico)$”>
    Header set Cache-Control “max-age=31536000, public”
    </filesMatch>
    # One month for css and js
    <filesMatch “.(css|js)$”>
    Header set Cache-Control “max-age=2628000, public”
    </filesMatch>

    ## Defer parsing of JavaScript ##?

    <FilesMatch “\.css$”>
    SetHandler application/x-httpd-php
    Header set Content-type “text/css”
    </FilesMatch>

    <FilesMatch “\.js$”>
    SetHandler application/x-httpd-php
    Header set Content-type “application/javascript”
    </FilesMatch>

    ### Cache GZIP Compression ##

    ## Mod DEFLATE ##

    <IfModule mod_deflate.c>
    <filesMatch “\.(js|css|html|php)$”>
    SetOutputFilter DEFLATE
    </filesMatch>

    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    </IfModule>

    Some suggestions:

    1. Try Autoptimize Plugin (which is superb). It can clear up 3 main parameters there. (defer JS, remove query strings, CSS minification, concatenation). Plus reduces the number of requests by a great deal.

    2. See if enabling gzip of .WOFF font file helps. GTMetrix says you can save 23 kb there. Or load fontawesome font from global CDN. It can be quicker.

    Once you’ve done this next step is to re-test the site and then look at the waterfall report there.

    Thread Starter monetxxx

    (@monetxxx)

    Thanks for your response,

    1. I’ve actually tried the Autoptimize Plugin and got a good diference in performance.

    2. I’ve added / changed this for the mod_deflate (code below).

    I think I’ve reached the best, I cannot defer the java as the theme is not working properly.
    So I consider myself OK with the performance. If any comments on your side let me know.

    Thanks guys for the help. And I wish this is useful to others.

    # ———————————————————————–
    # Defining MIME types to ensure the web server actually knows about them.
    # ———————————————————————–
    <IfModule mod_mime.c>
    AddType application/javascript js
    AddType application/vnd.ms-fontobject eot
    AddType application/x-font-ttf ttf ttc
    AddType font/opentype otf
    AddType application/x-font-woff woff
    AddType image/svg+xml svg svgz
    AddEncoding gzip svgz
    </Ifmodule>

    # ———————————————————————–
    # Compressing output.
    # ———————————————————————–
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
    </Ifmodule>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Extremely slow even after install and configuration’ is closed to new replies.