CodeIgniter Forums
Problem with using jquery - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with using jquery (/showthread.php?tid=54003)

Pages: 1 2 3


Problem with using jquery - El Forum - 08-21-2012

[eluser]Samus[/eluser]
[quote author="boltsabre" date="1345475331"]
Quote:well it doesn’t actually increase the load speed of your page exactly. if you have a slow page with lots of data your page is going to be slow anyway. it just increases the load speed of jquery loading into your page.

That's not quiet true, it's got to do with how many assets your browser can download at any one given time from one server (generally 8 is the limit I think). So that means that if you host the file yourself, you're stopping the browser from downloading other assets until it has fully downloaded the jQuery file (even if the browser has already cached the file, it still sends a http request to see if the file has changed unless you've specified a expire date).

This has a flow on affect right down the chain. Reducing the number of http requests both in the total overall number, and from individual servers, can speed up page load greatly. That is why many sites will host their images on a separate server - that way the browser can simultaneously download asset files (css, js, etc) AND images (such as your logo, sprites, etc).[/quote]
Problem solved.