Current time: 12-16-2017, 12:14 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there ANYTHING alse I can optimize?
03-11-2011, 02:22 AM (This post was last modified: 03-11-2011 02:23 AM by Marvin.)
Post: #1
Is there ANYTHING alse I can optimize?
I think I'm reaching the end, I cannot think of much else I can do to speed up my site other than going to a dedicated server (currently on a VPS).

The following test was taken a few moments ago:

http://www.webpagetest.org/result/110310_7D_4NP2/

It suggests two more CSS and two more JS files could still be combined, but I'm leaving that as is.

Not sure what I can do with the eTags, or if I should.

Other than those two items, is there anything else I may be overlooking?

Kind regards,

Marvin

Marvin
Find all posts by this user
Quote this message in a reply
03-11-2011, 03:14 AM
Post: #2
RE: Is there ANYTHING alse I can optimize?
I'd say the biggest win you have remaining would be to do something about moving the javascript out of the way but that might be more of a site overhaul than you are looking to do. It would probably be the biggest remaining thing that would impact the user experience.

As a sort of proxy I captured video of the current site and the site with the javascript blocked: http://www.webpagetest.org/video/compare...4E-l:No+JS

It looks like there's around a 300ms benefit to the user experience of seeing the page content by moving the javascript out of the critical path.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-11-2011, 03:38 AM
Post: #3
RE: Is there ANYTHING alse I can optimize?
Pat, I'd very much like saving the 300ms, but removing the javascripts is beyond my capabilities. :-)

P.S. Hmm, but it is now something that will be on my mind for a long time...

Marvin
Find all posts by this user
Quote this message in a reply
08-31-2011, 09:07 AM (This post was last modified: 08-31-2011 09:09 AM by Marvin.)
Post: #4
RE: Is there ANYTHING alse I can optimize?
(03-11-2011 03:14 AM)pmeenan Wrote:  I'd say the biggest win you have remaining would be to do something about moving the javascript out of the way but that might be more of a site overhaul than you are looking to do. It would probably be the biggest remaining thing that would impact the user experience.

As a sort of proxy I captured video of the current site and the site with the javascript blocked: http://www.webpagetest.org/video/compare...4E-l:No+JS

It looks like there's around a 300ms benefit to the user experience of seeing the page content by moving the javascript out of the critical path.

Pat, several months have past since you posted the above. It has always been on my mind, and finally today I actually started to work on removing .js from my site. I'm removing it for guests only for now. The tests look good. I still have to remove a few .js files from inner pages. It should be completed shortly. And then I will have to test the site well to see if I'm overlooking some broken functionality. :-)

Start render has improved from 600 to 700 ms down to 400 to 500 ms.

Here is a link to a test result: http://www.webpagetest.org/result/110830...ba201b1b4/

Marvin
Find all posts by this user
Quote this message in a reply
08-31-2011, 09:44 AM
Post: #5
RE: Is there ANYTHING alse I can optimize?
wow, that's really impressive.

Feeling adventurous?

It's pretty extreme but one more thing you can do is to inline the css for a first time visitor but still reference the external css for repeat visitors (so it can come from the cache). Looks like that might be able to shave another 100ms off of the render time.

It's a bit tricky but the logic basically works like this:
- For page loads where cookie X is not set, inline the css and add a bit of javascript (Y). If cookie X IS set then refer to the external version like normal
- Javascript Y creates a hidden iFrame a few seconds after onload that loads a special page (let's call it precache.php)
- precache.php is an empty html document that loads any external resources you want to load into the browser cache (the css file in this case) and sets cookie X (generally meaning that cokie X will be set when the user browser has cached the external version of the css)

Yahoo used to (may still) do something like this for their home page to get really fast first visits without having to also inline all of the code for repeat visits.

Awesome work regardless. It's easily one of the fastest pages I have seen come through here.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-31-2011, 10:35 AM (This post was last modified: 08-31-2011 12:22 PM by Marvin.)
Post: #6
RE: Is there ANYTHING alse I can optimize?
Pat, thanks for another idea! My only concern is, I've heard people say Search Engines, for the purposes of ranking sites, look also at the code-to-text ratio of pages, and if I add my .css to my base html page, I in affect add about 6,000 characters of code there. Do you think the code-to-text ratio may at all matter in regards to SEO (Search Engine Optimization)?

Here's a slow-motion video I just did. It compares the load time of Google.com vs the load time of my hobby site: Video

Marvin
Find all posts by this user
Quote this message in a reply
08-31-2011, 09:06 PM
Post: #7
RE: Is there ANYTHING alse I can optimize?
Hmm, good question. I've heard similar rumors but have never seen anything concrete. It's probably worth asking on the google webmaster forum to see if you can get some clarity on it.

The video is really impressive.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-31-2011, 10:07 PM
Post: #8
RE: Is there ANYTHING alse I can optimize?
FWIW, I poked around a bit and it looks like the code to text ratio may have originally come from a limitation where the googlebot would only download 100k for each page. The limit has long since been eliminated/raised and from everything I have read the amount of code doesn't matter at all, as long as the content can still be extracted and has the same semantic markup (i.e., you're not injecting the content from javascript).
Visit this user's website Find all posts by this user
Quote this message in a reply
08-31-2011, 10:49 PM
Post: #9
RE: Is there ANYTHING alse I can optimize?
Thanks, Pat, very much. That's a very helpful piece of information. I have also done a lot of searching and reading on the topic last night and this morning, and I have decided I'm going to test how the site speed changes when I include the external CSS. It may take me a while to do it, but I will post my results (hopefully within days).

Marvin
Find all posts by this user
Quote this message in a reply
08-31-2011, 10:58 PM (This post was last modified: 08-31-2011 10:59 PM by pmeenan.)
Post: #10
RE: Is there ANYTHING alse I can optimize?
If it helps any, the way I do it when I would inline my css from php is a really simple toggle. I keep the css file external but just use something like:
Code:
if ($inlineCSS) {
  echo '<style type="text/css">';
  echo file_get_contents('my.css');
  echo '</style>';
} else {
  echo '<link rel="stylesheet" href="/my.css" type="text/css">';
}

Makes it really easy to turn on and off and gives you a good basis for doing the cookie-based logic.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)