Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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>

    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>

Viewing 2 replies - 1 through 2 (of 2 total)