Skip to content
isaiah edited this page Dec 15, 2016 · 7 revisions

jQuery default version

The new default jQuery version 2.x.x (currently 2.2.4 at the time of this writing). You should test your stacks with Stacks 3 and jQuery 2 as soon as possible and resolve any conflicts. Going forward you should ensure that your stack is tested with the latest version of jQuery.

Complete list of available versions

default

default jQuery is v2.2.4. if you specify no maximum, or use the old style plist keys to include jQuery, the page will deliver v2.2.4.

to get jQuery 3, you must specify a minimum version of jQuery of v3.1.1

jQuery 3

3.1.1

jQuery 2

2.2.4, 2.1.4, 2.0.3

jQuery 1

1.12.4, 1.11.3, 1.10.2, 1.9.1, 1.8.3

Temporary compatibility versions

In your stack's plist you can provide limits to the minimum or maximum version of jQuery that your stack is capable of using. Stacks will choose the maximum version of jQuery that it can for all the stacks on the page. If there is no version that satisfies all the requirements stacks will warn the user. You should only provide limits when know incompatibilities exist. And only temporarily until you can resolve the incompatibilities.

Example usage of jQuery Min/Max: Limit to jQuery v1.x.x or older

  • Use case: Your stack is not yet working with jQuery 2, you need to limit it to version 1.x.x -- but all minor versions of jQuery v1.x.x work fine.
  • Set the maxVersion: In this case we set the max version to "1" (all minor versions of 1.x.x will be included)
  • Do no set a minVersion: Since you do not know any incompatibilities with minimum versions, don't set that value. Only set values when you know of a specific incompatibility.
  • Details: Note that we only set the maxVersion to 1, not to 1.11 -- this means that if jQuery 1.12 ships we'll get those fixes -- but we'll never get version 2. Specifying "1" as a max version is identical to specifying "1.99.99"
  • Updating: Being stuck on jQuery v1.x is a precarious position. More and more things require v2.x. You should, as quickly as possible, move to update your stack to work with jQuery 2. If you cannot update your stack, then you should consider retiring it as it will soon become so incompatible with other stacks that it will only be a headache for your users.

Example usage of jQuery Min/Max: Limit to jQuery newer than v2.1.x

  • Use case: Your stack relies on the very latest jQuery 2.1 technology, you need to ensure that you get the very latest version.
  • Set the minVersion: In this case we set the min version to "2.1" (all minor versions of 2.1.x will be included)
  • Do no set a maxVersion: Since you do not know any incompatibilities with future versions, don't set that value. Only set values when you know of a specific incompatibility.
  • Details: Note that we only set the minVersion to 2.1, not to "2.1.3" -- this means that if jQuery 2.1.5 ships we'll get those updates -- but we'll never get version 2.0.x or 1.x.x . Specifying "2.1" as a min version is identical to specifying "2.1.0"
  • Too limited: While the very latest technology can be great, building a stack with a very slim band of compatibility is a sure way to increase headaches for your users and email to your support inbox. Only use limits when there is no other option available with the knowledge that it will cost you time and money of extra user support.

jQuery CDN and Local

Stacks has linked to the Google CDN version of jQuery for several years and for most of our users it's a sufficient solution that is very simple. However some users require a local version of jQuery for intranets that do not have access to Google. For this reason Stacks is switching (back) to delivering a local copy of jQuery. However the user can choose (in the Stacks Preferences) the Google CDN version instead. There should be no impact to this change on your stacks, but it is worth noting.

Clone this wiki locally