Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1049494
    Luz
    Participant

    Hello Theme.co staff

    I’ve been trying to improve the performance on some of my X-sites. I tested them with Pingdom and Google. I’ve read several posts and tips and tutorials in this and other forums. But still need some help.

    1) I’ve added code to my .htaccess file. I’ve cut-pasted “Expire” (as suggested in https://community.theme.co/forums/topic/page-speed-problems-related-to-x-theme-add-expires-headers-cdn/) and “Gzip compression” (as suggested in https://community.theme.co/kb/performance/).
    But I think I still need to add the code for “Last-Modified or ETag” since Google asks it to completely fix “Leverage browser caching”.

    Could you provide it?

    ————

    2) Mobile friendliness is 96/100 due to “Size tap targets”. My site only shows social icons on topbar and the menu. Any idea of how could I improve this issue?

    ————

    3) Perfromance on one of my site was really poor BEFORE. AFTER following some of your suggestions (erase innecessary plugins, run w3 total cache, add “expire” and “gzip compression” codes to .htaccess), it really improved. It became “Fair” and I was pretty happy with that improvement…

    But NOW I checked it again (without modifying anything else I swear), and it’s poor again. 🙁 I really don’t get it.

    You’ll find the screenshots from the serie of BEFORE-AFTER-NOW test in the image attached and data to access my site in the next message.

    ———–

    Thanks in advance for your help.

    #1049497
    Luz
    Participant
    This reply has been marked as private.
    #1049535
    Luz
    Participant

    PS: Another screenshot… just a few seconds ago. I don’t get it. Thanks.

    #1049915
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    1. You may check it here https://davidwalsh.name/yslow-htaccess, it’s simply adding into .htaccess file too 🙂

    2. That means you need more spaces between clickable items like links, and items should be bigger enough to be selected with no difficulty. But I checked your site and should be okay unless you need to make your links more visible.

    3. I’m not really sure if I could help you as this isn’t covered by X theme, but you may also contact the optimization plugin’s author or community for proper configuration. That includes proper setting for render blocking, CDN, and much more.

    Thanks!

    #1049959
    Luz
    Participant

    Thank you very much for the quick answer! I’ll follow your suggestions, Rad. Thanks again! 🙂

    #1049972
    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    THanks.

    #1051557
    Luz
    Participant

    Hi again. As a newbie and not knowing English very well, I’d like to double check your suggestions before doing something wrong.

    1. The link you provided looks quite old (April 2009). If it’s still useful, which of the codes on that article should I add?

    This is the code I added already (as suggested in the posts I linked above)

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On 
    # Default directive
    ExpiresDefault "access plus 1 month"
    # My favicon
    ExpiresByType image/x-icon "access plus 1 year"
    # Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    # CSS
    ExpiresByType text/css "access plus 1 month"
    # Javascript
    ExpiresByType application/javascript "access plus 1 year"
    </IfModule>
    ## EXPIRES CACHING ##
    
    ## GZIP COMPRESSION ##
    <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 <code>mod_filter</code>
        # and can remove the <code><IfModule mod_filter.c></code> and <code></IfModule></code> lines
        # as <code>AddOutputFilterByType</code> 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>
    ## GZIP COMPRESSION ##

    ————-

    3. When you wrote this is not covered by X-Theme, I assume you refer to W3TC. I understand it. But still, isn’t there anything else you can check / do / suggest to improve this strange results of the performance test from my site? A clue…? Something…?

    I attach the screenshots of another serie of tests. Between tests I’ve made no modification to the site.

    I’d really appreciate your help. I’m lost. 🙁 Thanks!

    #1052007
    Rad
    Moderator

    Hi there,

    1. You may append this suggested code to your .htaccess file

    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
    Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
    Header unset ETag
    FileETag None
    </FilesMatch>

    You may remove or include more file types but its extension ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf. And you may also remove this line since it’s already available from other lines.

    Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"

    But this expiration implementation is much simpler as you don’t need to declare it one line at a time.

    eg. ExpiresByType image/x-icon "access plus 1 year"

    3. Due to varying design and implementation by users, there is no universal solution. Fixes and optimization depend on how the site is composed, build, and rendered. Hence, we can’t provide the solution for each unique issue per user. In times like this, I recommend to consult it to some expert 🙂

    Your screenshot only displays the grade but doesn’t have any details of the analysis. There are many varying contributing factors that are needed to check.

    Thanks for understanding.

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