Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2013, 12:19 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!

Code:
<script src="http://site.com/youtube.js"></script>
Reply With Quote
  #2  
Old 11-06-2013, 02:08 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 11-06-2013, 02:19 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Max Taxable
  #4  
Old 11-06-2013, 02:37 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 11-06-2013, 02:41 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Благодарность от:
tbworld
  #6  
Old 11-06-2013, 02:49 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very interesting @final_kaoss... Thanks for sharing.
Reply With Quote
Благодарность от:
Max Taxable
  #7  
Old 11-06-2013, 02:53 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 11-06-2013, 02:57 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, it doesn't appear to be from AME. Just checked it's 6 files & 7 folders.
Reply With Quote
  #9  
Old 11-06-2013, 02:58 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 [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:




The second one, without:





I am using AME, and all this did was add six requests... and three bytes.
Reply With Quote
  #10  
Old 11-08-2013, 08:25 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Благодарность от:
Max Taxable
Reply


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

Forum Jump


All times are GMT. The time now is 07:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06203 seconds
  • Memory Usage 2,265KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete