Page 1 of 1

[vQmod] Optimisation: Offload jquery to Google

Posted: Sat Mar 31, 2012 9:06 pm
by blackaqua
This is a really small change to the header tpl file which will request the two jquery files from Google, with a fallback if the servers are offline (or blocked) back to your site. Should shave a few milliseconds (not seconds) off your page load.

Advantages:
+ Reduce load and bandwidth on your server
+ Quicker page loading: Load cached copy, user is likely to have visited sites already and have the javascript cached - jquery files are reasonably large and will slow your page load
+ Quicker page loading: Parallel download of file reduces download queue for your domain
+ Quicker page loading: Uses Google's CDN so the user should get the file quicker, with less latency

Demo: http://blackaqua.com/ocdemo/1-5-2_1/

Compatibility:
Only tested with 1.5.2
Will test 1.5.x later (or just modify the jquery version in vQmod)

Install:
Requires vQmod, add to xml directory (remember to delete cache files if applicable)

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Sat Apr 28, 2012 9:44 am
by cwswebdesign
This makes a HUGE different to page load times! Thanks so much for this.

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Wed May 02, 2012 10:48 am
by gti2756
This is great! Many Thanks!


O0

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Wed Jun 13, 2012 4:58 pm
by Dutch_guy
Thanks!

Never realised the advantage that people may already have a cached version on their computer.

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Wed Jun 20, 2012 8:21 pm
by prem
Any idea if it works with 1.5.3.1?

Thanks

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Fri Jun 22, 2012 2:39 pm
by prem
I get the following error:


---------- Date: 2012-06-22 06:34:56 ~ IP : 85.217.145.142 ----------
REQUEST URI : /sun/
MOD DETAILS:
modFile : /home/kondomib/public_html/sun/vqmod/xml/jquery-google-blackaqua.xml
id : jquery via Google
version : 1.0
vqmver :
author : blackaqua - http://blackaqua.com - http://forum.opencart.com/viewtopic.php?f=131&t=57640
SEARCH NOT FOUND (ABORTING MOD): <script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>

----------------------------------------------------------------------

I checked the file there and it is with the same filename(jquery-1.7.1.min.js)

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Fri Jul 13, 2012 5:51 pm
by cwswebdesign
prem wrote:Any idea if it works with 1.5.3.1?

Thanks
Works fine for me on 1.5.2 and 1.5.3.1

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Wed Aug 15, 2012 8:19 pm
by mrjave
cwswebdesign wrote:
prem wrote:Any idea if it works with 1.5.3.1?

Thanks
Works fine for me on 1.5.2 and 1.5.3.1
good day all,

how do we know it is working fine?
just curious.

pls advice me.
many thanks!

Jave

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Wed Aug 15, 2012 11:59 pm
by cwswebdesign
mrjave wrote:
cwswebdesign wrote:
prem wrote:Any idea if it works with 1.5.3.1?

Thanks
Works fine for me on 1.5.2 and 1.5.3.1
good day all,

how do we know it is working fine?
just curious.

pls advice me.
many thanks!

Jave
Check your vqmod error log and you can also run various speed tests through different sites.

DL

Re: [vQmod] Optimisation: Offload jquery to Google

Posted: Tue Sep 24, 2013 12:47 am
by ptelang
http://www.transpacific-software.com/bl ... oogle-cdn/

For non-developers this is a good Free plugin. When installed will pull Jquery from Google CDN. Its built on vQmod without touching any core functionality. Its completly plug and play . No need to do any code tweaking.

Image