Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.


The risks of using hosted resources hosted jQuery

Long ago when we started shipping jQuery resources with DotNetNuke we began offering a Host Setting which allowed you to use a HOSTED version of the jQuery resources. There are a number of benefits for using the hosted jQuery resources, of which I will mention some below, but there are also some potential disadvantages or risks to this as well.

First a quick summary of what the setting allows you to do. With DNN (specifically with DNN 6.*+) we ship both jQuery resources and the jquery.ui resources. These are javascript files that exist on the web server that hosts your DotNetNuke website. Using the HOSTED setting allows you to basically have those files distributed from a CDN (content delivery network).

Advantages to the Hosted resources

  1. Less bandwidth for your web server – by having the files on a CDN, (the default option is Google’s CDN) visitors to your website don’t have to download the files from your webserver, saving you bandwidth for each user.
  2. Potential that they are already downloaded – if a visitor to your website has accessed any other website that points to the same CDN for jQuery files they may not need to download the files again, improving the overall experience visiting your website for the first time.
  3. Faster download experience – because of the way browsers handle “requests” for websites, they typically can only download 5 resources from a domain at a time, if you have resources spread out on other domains, they can simultaneously download more resources at once.
  4. Latest resources available – Due to the way Google handles the CDN for jQuery, it is possible to load the “latest” version of the jQuery resources, without having to make changes to your website or settings, though this can also be a disadvantage.

Disadvantages to the Hosted resources

  1. Files change – one of the advantages, is also a disadvantage, and recently became so. If Google updates the jquery files, as they recently did with version 1.8.0, this may cause issues with a website. We’ll talk more about that later.
  2. Files get removed – by referencing resources on another web server, you always run the risk that those files get removed without any notice to you.

The current problem

It appears that sometime last week Google updated the latest jQuery release, moving to v1.8.0, having previously been on I believe version 1.7.2. This normally wouldn’t be a problem, but unfortunately something in the 1.8.0 release conflicts with something that DotNetNuke depends on, and people have started reporting issues with DNN installations when using the hosted version of jQuery. I personally found that my Control Panel now overlapped the top of my pages on my DNN 6.2.2 sites, where previously this overlap didn’t occur. I believe other users have seen more noticeable problems.

Fixing the problem, Protecting yourself

There are two ways to go about fixing this problem, you can choose which option you want to use.

  1. Turn off the hosted jQuery setting in HOST SETTINGS. This will let DNN default back to the version of jQuery that hips with that platform, I believe that would currently be v1.7.2. This will make sure that your DNN site always uses the latest shipped w/ DNN version of jQuery.
  2. Don’t use the generic version URL for hosted jQuery. The default url that ships with DNN for the hosted setting is http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js notice that the version there is simple 1, this basically loads up the latest release of jQuery for version 1, which as of last week (or sometime recently) is V1.8.0. You can get around this by changing the URL to be http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js which would specifically point to 1.7.2 which ships with DNN 6.2.2 (the latest DNN release). The downfall to this approach is that if the jQuery version gets updated in a future DNN release you may need to make changes to your hosted settings to see the newer version with bug fixes or other features. 

The safest option would be to simply not use the hosted jQuery version, but you can definitely weigh out the costs/benefits yourselves and make your own decision.

Update: Thanks to @Hattan for the suggestion of this blog post which provides an alternative way to load the local version of jQuery if the CDN version fails to load. This won't prevent problems from changes, but would help if a CDN is unavailable.

Comments

There are currently no comments, be the first to post one.

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Daniels (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Steven Fisher (1)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out