Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 06 Nov 2013, 00:19
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Use youtube? Don't let it slow your site down!

So I came across this page today and it's working wonders. It took a page on my blog from 3mb to around 600kb in total size.
http://www.labnol.org/internet/light...-embeds/27941/

All you have to do is pretty much write this in the footer & upload the file from the page above.

I suggest trying it on a page with 2 or more youtube videos and you will definitely see a change not only in the loading times of your pages but also a bit of a increase in your pagespeed/yslow scores on webpagetest.org and both of these are always a plus!


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 06 Nov 2013, 02:08
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Hmm wonder how this works with AME? About to try it to find out - "can't hurt, can always revert."

OOPS after reading the entire article, two issues come up.

1.) I don't see any file from there to download.

2.) Would the AME definitions interfere with this? Or vice-versa?

I'll wait a bit.
Reply With Quote
  #3  
Old 06 Nov 2013, 02:19
final kaoss final kaoss is offline
 
Join Date: Apr 2006
The js I was referring to was this.
https://labnol.googlecode.com/files/youtube.js
So yeah like the guy stated, if you run a high traffic site, please host it locally lol. Sorry if I wasn't clear enough but that's the js that you want to save & upload to your host.

Last edited by final kaoss; 06 Nov 2013 at 02:25.
Reply With Quote
  #4  
Old 06 Nov 2013, 02:37
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by final kaoss View Post
The js I was referring to was this.
https://labnol.googlecode.com/files/youtube.js
So yeah like the guy stated, if you run a high traffic site, please host it locally lol. Sorry if I wasn't clear enough but that's the js that you want to save & upload to your host.
That clears that one up... But I use AME so I am leery about any embed changes ya know?
Reply With Quote
  #5  
Old 06 Nov 2013, 02:41
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Well simply put upload the file and then, add this to the footer template of a theme at the very bottom.
<script src="http://site.com/youtube.js"></script>

Thats it! If you have any ill effects... just remove that line & it's reverted.
Reply With Quote
  #6  
Old 06 Nov 2013, 02:49
tbworld tbworld is offline
 
Join Date: Oct 2008
Very interesting @final_kaoss... Thanks for sharing.
Reply With Quote
  #7  
Old 06 Nov 2013, 02:53
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Well.... Turns out I already have a file styled "youtube.js" on my server. Wondering if that is a AME file...
Reply With Quote
  #8  
Old 06 Nov 2013, 02:57
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Nope, it doesn't appear to be from AME. Just checked it's 6 files & 7 folders.
Reply With Quote
  #9  
Old 06 Nov 2013, 02:58
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by final kaoss View Post
Nope, it doesn't appear to be from AME. Just checked it's 6 files & 7 folders.
Yep i just renamed it "youtube_old" and it had no effect, and uploaded the new one. Installing the call for it now.



UPDATE: This had no effect at all, apparently AME overrides the call.

ANOTHER UPDATE: "Hey dummy, change the "site.com" in the call, to your actual domain where the js file is located!"

Seems to have made it faster in threads with a bunch of videos, otherwise no change. All embeds are still there and everything still works right, can't see any harm done.

I have the call installed on the footer of only one style, so i will test that and a style without, on webpagetest and see if there's a change in the kb loaded.

--------------- Added 06 Nov 2013 at 03:11 ---------------

FINAL UPDATE...

NO difference at all on kb loaded or pageload speed with and without this addition, while using AME.

--------------- Added 06 Nov 2013 at 04:37 ---------------

Here's two identical tests at webpagetest dot org, with same browser, same location, same connection and only minutes apart. The first one is with this addition:




The second one, without:





I am using AME, and all this did was add six requests... and three bytes.

Last edited by Max Taxable; 06 Nov 2013 at 03:07.
Reply With Quote
  #10  
Old 08 Nov 2013, 20:25
smirkley smirkley is offline
 
Join Date: Apr 2008
Not using AME, but I gave it a try, remotely as well as locally.


But no change in pageload speed or pageweight.

Quite honestly, I could not find any change of operation.

Unless I missed the obvious....
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:31.

Layout Options | Width: Wide Color: