Re: [page-speed-discuss] How do I optimise my pages for perfect 100? I've already set .htaccess and all

641 views
Skip to first unread message

Dave Mankoff

unread,
Aug 26, 2013, 2:40:16 PM8/26/13
to page-spee...@googlegroups.com, mod-pagesp...@googlegroups.com
Howdy.

First, let me say that getting a 90 is a good score. The goal for PageSpeed Insights should not be to get 100. It should be to address the recommendations that it gives in a reasonable manner. This is something that tools like PageSpeed Service and mod_pagespeed aim to help you do.

I am forwarding your email to the mod_pagespeed list as they'll be able to help address at least some of your concerns.




-dave mankoff


On Sat, Aug 24, 2013 at 5:03 PM, SingaporeanLifeStyle <cha...@singaporeanlifestyle.com> wrote:


Hello Friends!!

This is getting too deep for me to understand.
My blog in question is :
http://www.singaporeanlifestyle.com

I have the above (2 page screenshots attached) settings in PSS

and set these in my .htaccess :

=== begin copy paste ===


<IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE application/atom+xml
        AddOutputFilterByType DEFLATE application/json
        AddOutputFilterByType DEFLATE application/xhtml+xml
        AddOutputFilterByType DEFLATE application/xml
        AddOutputFilterByType DEFLATE text/css
        AddOutputFilterByType DEFLATE text/html
        AddOutputFilterByType DEFLATE text/plain
        AddOutputFilterByType DEFLATE text/xml

        # The following MIME types are in the process of registration
        AddOutputFilterByType DEFLATE application/xslt+xml
        AddOutputFilterByType DEFLATE image/svg+xml

        # The following MIME types are NOT registered
        AddOutputFilterByType DEFLATE application/mathml+xml
        AddOutputFilterByType DEFLATE application/rss+xml

        # Compress JavaScript
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE application/x-javascript
        AddOutputFilterByType DEFLATE text/ecmascript
        AddOutputFilterByType DEFLATE text/javascript
</IfModule>


<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/plain "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-icon "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
    </FilesMatch>
    <FilesMatch "\.(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "public"
    </FilesMatch>
    <FilesMatch "\.(css)$">
        Header set Cache-Control "public"
    </FilesMatch>
    <FilesMatch "\.(js)$">
        Header set Cache-Control "private"
    </FilesMatch>
    <FilesMatch "\.(x?html?|php)$">
        Header set Cache-Control "private, must-revalidate"
    </FilesMatch>
</IfModule>

=== End Copy Paste ===


And I'm using Smush It for images compression,

But when I check my blog with Google PageSpeed Insight, most of the remarks are pointing to external sources (CSS / javascripts), ie:

=== For Desktop ===
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
Your page has 1 blocking script resources and 1 blocking CSS resources. This causes a delay in rendering your page.
Properly formatting and compressing images can save many bytes of data.
Your page requires additional network round trips to render the above-the-fold content. For best performance, reduce the amount of HTML needed to render above-the-fold content.
  • 49.9KiB of the response was required to render the above-the-fold content. Prioritize visible content that is needed for rendering above-the-fold.
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.


=== For Mobile ===


Suggestions Summary

Your page has 1 blocking script resources and 9 blocking CSS resources. This causes a delay in rendering your page.
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
Your page requires additional network round trips to render the above-the-fold content. For best performance, reduce the amount of HTML needed to render above-the-fold content.
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.




--
You received this message because you are subscribed to the Google Groups "page-speed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to page-speed-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/page-speed-discuss/1e2a1ad0-3573-4af7-ad15-015006e4661b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Joshua Marantz

unread,
Aug 26, 2013, 3:34:16 PM8/26/13
to mod-pagespeed-discuss, page-speed-service-discuss, page-spee...@googlegroups.com
+page-speed-service-discuss

This site uses PageSpeed Service (PSS), not mod_pagespeed (MPS), but the issues your face are somewhat common, so I'm leaving both discussion-groups on this thread.

First of all, you have prevented PSS from caching and optimizing your JavaScript by marking it private:
    <FilesMatch "\.(js)$">
        Header set Cache-Control "private"
    </FilesMatch>
Is there a reason for that?  It would help if your JavaScript could be optimized.

Having said that, when I looked at your site on my machine, it looked reasonably well optimized. I also checked your origin caching headers and, consistent with your Apache config, and apart from JavaScript, your caching headers look OK.

It's possible that when you ran PageSpeed Insights, your resources were cold in PSS's caches.  When I looked at your site myself, everything got optimized on first view, so the server-side cache must have been warmed up.


I would also reconsider whether using both Smush-It and PageSpeed Service's image optimization make sense.  PSS has the advantage that it can transcode your images to webp, providing a 30% byte savings on Chrome and Android devices relative to jpeg.  I think Smush-It might not be able to do that because it would run as an offline step and might not be able to perform optimizations that are tuned to a particular browser.  PSS can also inline small images into the HTML.  Further, when you have multiple distinct image optimization engines in the pipeline, quality might be impacted.  Could you check to see whether PSS+SmushIt is better than just PSS alone or SmushIt alone?

-Josh 


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Joshua Marantz

unread,
Aug 26, 2013, 3:35:25 PM8/26/13
to mod-pagespeed-discuss, page-speed-service-discuss
-page-speed-discuss which does not exist
Reply all
Reply to author
Forward
0 new messages