I would suggest to introduce a several version of jQuery on one page and separate them by naming:
jQuery 1.5.x = jQuery15, etc.
When some version got tested it replaced for core (with jQuery name)
Included versions could be added in settings by dropdown with source:
- none
- google
etc.

Using this approach it will be easy for other modules to implement functionality dependent on new versions of jQuery and haven't corrupt existing functionality.

Comments

markhalliwell’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

While it sounds good, in theory, it's not very practical... especially from a client side resource loading perspective. Considering that each version of jQuery is, on average, about 150k in size (non-minified/compressed), this could run the risk of of severely bogging down a site's page load/response time.

Never mind the pure logistical nightmare of figuring out a way to "wrap" each provided module's JS to ensure it uses the proper jQuery "version".

No, I'd much rather just push back on the module/theme developers to understand that they have to be aware of supporting multiple versions of jQuery (at least in 7.x).

Furthermore jQuery Migrate (#2156881: Support (optionally) the use of the jQuery Migrate Plugin) was added which can help remedy a lot of these issues.