1
nmshah
loading jquery from google servers...
  • 2012/2/26 11:13

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Read an article on 3 reasons why you should let Google host jQuery for you.

Since xoops loads jquery by default is there a way to do it directly from the google servers without having multiple instances of it being loaded?

2
redheadedrod
Re: loading jquery from google servers...

Because Jquery is relatively new to Xoops there is some chance of having multiple instances of it in your system. This generally happens if you install a module that has jQuery as a part of it. With some simple editing of the module this is something that can be easily modified. You should be able to use the jQuery that is installed with the system and not need the one in the module.

This also applies with the themes not designed for 2.5 with the preloaded jquery in mind...

There was a comment somewhere else about the command to use to include jquery in your project to make sure it was not already loaded but you would have to do a search on it.

I just spent a few minutes looking for the jquery library and did not find it so I wonder if we are not already loading this library from the google site. Hopefully a core programmer will chime in that knows.

I did a search in files for jquery as well so I am not sure how the heck jquery is being loaded by the system but I can see where there are a couple jquery plugins included in the system so it should already be included somewhere.

And the whole idea here is that if you loaded jquery at some point your browser will cache it so it is faster. Once you have accessed a site that jquery is already cached unless you delete your cache all the time. The benefits of it being loaded from google are that most people have already been on a site that has loaded that library and won't need to load it again. Not to mention it is a little less bandwidth on the host system which is not a big deal until you get into thousands of users.

The only two cons I am aware of with using googles jquery are that you are dependent on their servers being up all the time and their servers then may also be able to track how many users access your site. I am unsure about this but I am guessing here if your site refers them to google that google can pick it up.
Attending College working towards Bachelors in Software Engineering and Network Security.

Login

Who's Online

179 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 179


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits