Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1396669
    Ann
    Participant

    Hey there,

    This might be out of the scope of your support and if it is – that’s totally fine! Thought I’d ask at least 🙂

    I followed the instructions describer here https://community.theme.co/kb/performance/ to optimize my sites performance. And I added the code below to my .htaccess file:

    <IfModule mod_deflate.c>

    # Force compression for mangled headers.
    # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
    </IfModule>
    </IfModule>

    # Compress all output labeled with one of the following MIME-types
    # (for Apache versions below 2.3.7, you don’t need to enable mod_filter
    # and can remove the <IfModule mod_filter.c> and </IfModule> lines
    # as AddOutputFilterByType is still in the core directives).
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
    application/javascript \
    application/json \
    application/ld+json \
    application/rss+xml \
    application/vnd.ms-fontobject \
    application/x-font-ttf \
    application/x-web-app-manifest+json \
    application/xhtml+xml \
    application/xml \
    font/opentype \
    image/svg+xml \
    image/x-icon \
    text/css \
    text/html \
    text/plain \
    text/x-component \
    text/xml
    </IfModule>

    </IfModule>

    If I add the code below to the .htaccess to enable browser caching, could that cause a conflict?

    ## EXPIRES CACHING ##
    <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 plus 2 days”
    </IfModule>
    ## EXPIRES CACHING ##

    Thanks!

    Ann

    #1396732
    Darshana
    Moderator

    Hi Ann,

    You can add if required. Please check the following resource (http://softstribe.com/wordpress/how-to-add-expires-headers-in-wordpress/).

    Thanks!

    #1396922
    Ann
    Participant

    Great!

    Added the code and works perfect and really improved the speed 🙂

    Thanks again!

    #1397285
    Friech
    Moderator

    You’re more than welcome, glad we could help.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1396669 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>