Self-hosting jqueryUI 1.11.2 or use alternate cdn for jquery

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
1/21/2015 5:09:35 PM
Gravatar
Total Posts 1

Self-hosting jqueryUI 1.11.2 or use alternate cdn for jquery

Hi, 

i am am developing a website for a client, but the site is running too slow.  It has been determined that the slowness is caused by delays in downloading JavaScript and jquery from the Google CDN.

I would like to either self-host the Jquery and JqueryUI, or have the option of pointing to an alternative CDN.

I have read the instructions on self-hosting jquery and jqueryUI at https://www.mojoportal.com/self-hosting-jquery-jquery-ui-files, and I think I have the Jquery side sorted.  But the file names and folder structure for the JqueryUI files are different with the latest version (1.11.2), which is confusing me.

Another option would be to simply use a different CDN for jquery, but I haven't yet found any instructions on how to do that.

The website is on windows shared hosting, asp.net 4, and uses a sql server 2012 database, I am using the latest version of Mojoportal, I think this is 2.4.0.8.

i am aware that I could switch to dedicated hosting, which would speed things up immensely, but I don't want to do that if this issue can be solved on shared hosting.

So, can anyone assist with either self hosting the JqueryUI or pointing to a different CDN?

Regards,

David Davies.

1/23/2015 10:28:25 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Self-hosting jqueryUI 1.11.2 or use alternate cdn for jquery

The thing to understand about about CDN-provided code is that it's your visitors' browser that's making a direct connection to the CDN servers to download JQuery. Since web browsers should cache JQuery and other JavaScript, even in a situation where a CDN is responding slowly it should only be noticeable during their very first page load on your site, and from then on page loads would be much quicker. In addition, many other sites are using Google CDN for JQuery and JQueryUI, so it could well be that any given user will already have them cached by having visiting another site previously.

The only scenario I can envision where self-hosting JQuery/JQueryUI would be consistently quicker than a CDN would be a situation where you have both a beefy web server and clients together on the same fast local area network, as in an Intranet-type deployment. In that case, the gigabit local speeds will definitely trump an internet connection to Google servers for that critical first page hit. I believe this is implied in the self-hosting JQuery article--the envisioned scenario is one where the client may not have access to the Internet at all, making self-hosting mandatory.

Have you considered the possibility that Google is slow in your testing but may be faster from elsewhere? I'd be surprised if Google CDN is slow across the board--we are using the Google CDN but I've not had any reports of slowness. Could it be your DNS lookups that are slow?

I've never tried alternate CDNs, but I did see that JQuery has their own CDN that you test with, at https://code.jquery.com/

I hope that helps,

Jamie

You must sign in to post in the forums. This thread is closed to new posts.