View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019932 | mantisbt | performance | public | 2015-07-14 09:46 | 2016-06-05 19:24 |
Reporter | vboctor | Assigned To | vboctor | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 1.3.0-beta.3 | Fixed in Version | 1.3.0-beta.3 | ||
Summary | 0019932: Load jquery from CDN | ||||
Description | We should support loading jQuery from CDN by default and provide a configuration option to revert to local version. See sources at: This should at least improve first load performance. | ||||
Tags | No tags attached. | ||||
Pros/Cons
Side notes
I prefer to have the default setting for CDN usage to OFF. [1] http://weblogs.asp.net/jongalloway/using-cdn-hosted-jquery-with-a-local-fall-back-copy |
|
This sounds like a good idea, but I'm also tempted to say that the default setting should be OFF. We also need to decide which CDN(s?) we want to use/propose. Finally, this needs to be carefully integrated and tested with CSP. Thanks Roland for the research, particularly that interesting article on fallback which is something I definitely think we should do. |
|
Few years ago, I would have thought OFF is a good choice .. but not anymore. 1- CDNs are very common now due to perf improvement - Popular page speed tools (i.e. YSlow, Google page speed ..etc) strongly recommend using CDNs for few years now. Amazon CloudFront is commonly used to implement very cheap CDNs |
|
82.7% of statistics are made up on the spot ? ;-) Considering that we have virtually no data on MantisBT usage in the real world, I could challenge where you got your figures from, but I don't think this is worth discussing. My point for default = OFF is that not using CDN and downloading from MantisBT server is guaranteed to work in every single scenario (even though it may cause degraded performance compared to CDN), whereas using a CDN may not. |
|
We might start endless discussions if we want to consider all possible pros/cons, e.g. I think there is just one solution that would work for all: |
|
I've merged the change with default OFF for now. If we agree later to turn it ON, then we can do a follow up checkin. We can also decide to start OFF in 1.3 and turn ON in 2.0. Feel free to continue the discussion. |
|
I am not sure if cdn_enabled should be in list $g_global_settings. |
|
Relating to ability to have database overrides, I use the following logic: Let's assume we have two roles:
In this case, I expect CDN to be an option for the Sysadmin/hoster and not one for the MantisBT administrator, and hence, I would add it to global settings and use config_get_global to get it. Hence, I would make a follow up change for this. A bad example that we have today is default_timezone. At the moment, administrators are able to set it, but code looks at the global config, hence, it doesn't really work as expected. Does this make sense as a way to reason about this? |
|
BTW, I just enabled CDN for https://www.mantisbt.org/bugs |
|
MantisBT: master 5414ba9a 2015-08-14 22:12 Details Diff |
Load jquery from CDN This is to improve performance for the following reasons: - Browser loads more in parallel due to loading from different servers. - CDN libraries likely to be already cached as it is referenced by other websites / web apps. - CDN will deliver lower latencies with the possible exception of intranet. Fixes 0019932 |
Affected Issues 0019932 |
|
mod - config_defaults_inc.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
mod - core/http_api.php | Diff File | ||
mod - docbook/Admin_Guide/en-US/config/html.xml | Diff File | ||
MantisBT: master 0a45b7b1 2015-08-15 09:01 Details Diff |
Use protocol-less urls to reference CDN Fixes 0019932 |
Affected Issues 0019932 |
|
mod - core/html_api.php | Diff File | ||
mod - core/http_api.php | Diff File | ||
MantisBT: master fc9a3320 2015-08-15 09:05 Details Diff |
Use constants for jQuery and jQueryUI versions Fixes 0019932 |
Affected Issues 0019932 |
|
mod - core/constant_inc.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
MantisBT: master 958d28bc 2015-08-18 22:43 Details Diff |
Revert "Use protocol-less urls to reference CDN" Protocol-less urls were causing the CSP to fail. This reverts commit 0a45b7b1b375fdc088cdbbc9908928755362c756. # Conflicts: # core/html_api.php |
Affected Issues 0019932 |
|
mod - core/html_api.php | Diff File | ||
mod - core/http_api.php | Diff File | ||
MantisBT: master aa9b4f8a 2015-08-18 23:44 Details Diff |
Mark cdn_enabled as global setting Issue 0019932 |
Affected Issues 0019932 |
|
mod - config_defaults_inc.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
mod - core/http_api.php | Diff File | ||
MantisBT: master e753cca6 2016-05-23 11:54 Details Diff |
Use JQUERY_VERSION constant in install.php Commit fc9a3320815f8341236cb7bf0c41855227a3c8c3 missed one occurence of jQuery version number. Issue 0019932 |
Affected Issues 0019932, 0021059 |
|
mod - admin/install.php | Diff File |