vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Use youtube? Don't let it slow your site down! (https://vborg.vbsupport.ru/showthread.php?t=304206)

final kaoss 11-06-2013 12:19 AM

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! :D

Code:

<script src="http://site.com/youtube.js"></script>

Max Taxable 11-06-2013 02:08 AM

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.

final kaoss 11-06-2013 02:19 AM

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.

Max Taxable 11-06-2013 02:37 AM

Quote:

Originally Posted by final kaoss (Post 2458568)
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?

final kaoss 11-06-2013 02:41 AM

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.

tbworld 11-06-2013 02:49 AM

Very interesting @final_kaoss... Thanks for sharing. ;)

Max Taxable 11-06-2013 02:53 AM

Well.... Turns out I already have a file styled "youtube.js" on my server. Wondering if that is a AME file...

final kaoss 11-06-2013 02:57 AM

Nope, it doesn't appear to be from AME. Just checked it's 6 files & 7 folders.

Max Taxable 11-06-2013 02:58 AM

Quote:

Originally Posted by final kaoss (Post 2458582)
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!" :D

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 [DATE]1383711077[/DATE] at [TIME]1383711077[/TIME] ---------------

FINAL UPDATE...

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

--------------- Added [DATE]1383716246[/DATE] at [TIME]1383716246[/TIME] ---------------

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:

https://vborg.vbsupport.ru/external/2013/11/17.jpg


The second one, without:

https://vborg.vbsupport.ru/external/2013/11/18.jpg



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

smirkley 11-08-2013 08:25 PM

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....


All times are GMT. The time now is 12:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01216 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete