Google PageSpeed Insights

Post here if your message doesn't fit into another forum but is still about web development. Includes site critiques, web hosting and server questions, helpful software and resources, and more.
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Google PageSpeed Insights

Post by Albert Wiersch » Tue Oct 08, 2013 10:23 am

If you haven't used the Google PageSpeed Insights tool, then I would recommend it.

I used it to make further speed improvements to CSE HTML Validator's website. It made me aware of some images that I was able to significantly shrink. I also decided to enable web server compression per their recommendation/suggestion, and added some server headings to better optimize browser caching.

Just enter the URL of your site here:
http://developers.google.com/speed/pagespeed/insights/

Image
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Wed Sep 17, 2014 12:22 pm

I can't agree enough.

This is also good, combining PageSpeed Insights and ySlow: http://gtmetrix.com/ as is this page: http://www.webpagetest.org/

You also have PageSpeed and ySlow plugins for Firefox and Chrome.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Wed Sep 17, 2014 1:18 pm

Thanks Rick!

That's a good link indeed (http://www.webpagetest.org/). I failed a keep-alive test with IE and did some further research. I found this page:
HTTPS and Keep-Alive Connections

It seems I had these outdated config lines in my Apache config file:

Code: Select all

 SetEnvIf User-Agent ".*MSIE.*" \
  nokeepalive ssl-unclean-shutdown \
  downgrade-1.0 force-response-1.0
This is especially bad because I recently switched to HTTPS only.

I've finally removed those lines today. Originally they resolved SSL bugs with versions of IE earlier than 6, but it's not even worth bothering with those obsolete issues anymore, and unfortunately the lines I had affected all versions of IE, not just the buggy ones, causing a lot of unnecessary SSL connections and slowing everything down unnecessarily.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Wed Sep 17, 2014 2:14 pm

Glad it worked for you.

Did your score improve? I find I keep tweaking and scanning, tweaking and scanning and don't get anything else done. At least if I could hit 100%, I could leave it well enough alone, right?
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Wed Sep 17, 2014 4:19 pm

Hi Rick,

My 'Keep-alive Enabled' score on http://www.webpagetest.org/ drastically improved for tests with IE after removing the IE bug work-around from my Apache config.

It's fun to tweek and get as high a score as you can but there's a point where it makes sense to stop and just accept the score you have even if it's not 100. :D

I do find the suggestion to use a CDN for static assets interesting. I suppose this is meant to take a load of your server and make it faster and more efficient? I haven't read much about doing that but I don't currently see much need for it for any of my sites. But perhaps it is also meant to make things faster for the end user because some type of optimization or improved routing can occur?
Image
Albert Wiersch

YvesL
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 3
Joined: Tue Sep 16, 2014 10:44 pm

Re: Google PageSpeed Insights

Post by YvesL » Wed Sep 17, 2014 4:51 pm

Using a CDN, should help a lot. It take load off your server and serve the static assets to your user from a server near their location.
Yves Levesque
Programmer, Web Designer, Graphic Designer

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Fri Sep 19, 2014 8:13 am

I've added some websites mentioned in this thread to the Recommended Resources page.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Fri Oct 24, 2014 7:44 am

Albert Wiersch wrote:It's fun to tweak and get as high a score as you can but there's a point where it makes sense to stop and just accept the score you have even if it's not 100. :D
Tell me about it. I'm doing this every day. :? I do have a 99% score on many pages, but the Google Analytics script's 2 hour cache robs me of that final 1%.
Albert Wiersch wrote:I do find the suggestion to use a CDN for static assets interesting. I suppose this is meant to take a load of your server and make it faster and more efficient? I haven't read much about doing that but I don't currently see much need for it for any of my sites. But perhaps it is also meant to make things faster for the end user because some type of optimization or improved routing can occur?
Part of the reasoning is to get around the 6 simultaneous downloads limit that most browsers have. You can DL 6 files from your domain AND the other domain. I use it on our home page, which has a slider, to grab those 6 files from another domain we own, which also has SSL. Of course the dns lookup for that second domain has a little penalty too. This stuff is all visible on the waterfall test with the "document complete" part being the important part (along with when you first see content).

Of course HTTP/2 will fix that 6 simultaneous download limit for us.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Fri Oct 24, 2014 9:22 am

RSteinwand wrote:Part of the reasoning is to get around the 6 simultaneous downloads limit that most browsers have. You can DL 6 files from your domain AND the other domain. I use it on our home page, which has a slider, to grab those 6 files from another domain we own, which also has SSL. Of course the dns lookup for that second domain has a little penalty too. This stuff is all visible on the waterfall test with the "document complete" part being the important part (along with when you first see content).

Of course HTTP/2 will fix that 6 simultaneous download limit for us.
Thanks Rick. I had not really looked into that and I may have to, at least for curiosity's sake.

However, I think my website is pretty lightweight the way it is and may not benefit much from using a CDN... but a CDN could have other benefits as well. Hmmmmmmm......... :D

HTTP/2 sounds quite interesting as well.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Fri Oct 24, 2014 9:34 am

I wet myself when I saw HTTP/2 was in the Win10 preview browser AND IIS. :shock:

When I got myself cleaned up, I sent off an email to my supervisor with a link to the page and "I WANT THAT".
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Fri Oct 24, 2014 9:58 am

Yes, HTTP/2 sounds great and I hadn't heard much about it... something definitely worth keeping an eye on. I'm really curious as to how much real-world difference it will make.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Wed Dec 03, 2014 10:04 am

Here's a performance tip I bet most of us aren't using, add this to the head of pages using Google Analytics:

Code: Select all

<link rel="dns-prefetch" href="//www.google-analytics.com">
Of course if you have any other domains you're using, you'll want to add those as well. I know many sites use images and themes from other sites that should also be added. If you're using content from other domains, add the prefetch. :mrgreen:

Code: Select all

<head>
    <link rel="dns-prefetch" href="//www.domain1.com">
    <link rel="dns-prefetch" href="//www.domain2.com">
</head>
Albert, you may want to add that to your list of performance tweaks.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Wed Dec 03, 2014 6:39 pm

Hi Rick,

Thanks for the suggestion. I like it but I'm not sure where to add it. I don't have a "random performance tip" message like I do for SEO, accessibility, and mobility tips, and this suggestion seems to be a performance tip that applies to more than just mobile websites.

Were you thinking of the random mobility tip messages when you suggested this?

Thanks.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google PageSpeed Insights

Post by RSteinwand » Wed Dec 03, 2014 7:02 pm

Hi Albert,

I guess with the mobile tips would be good for now. Many of those items apply to desktop as well.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google PageSpeed Insights

Post by Albert Wiersch » Thu Dec 04, 2014 8:42 am

Thanks Rick. I'll just add it to the mobile tips.

UPDATE: Added this:
[133] Mobility Tip #34 - Consider reducing DNS resolution time by using "link" elements for DNS prefetching, like with <link rel="dns-prefetch" href="//domain.com">. Visit http://www.chromium.org/developers/desi ... refetching for more information.
Image
Albert Wiersch

Post Reply