? ? Pending

User tests: Successful: Unsuccessful:

avatar regularlabs
regularlabs
3 Jul 2017

This PR adds option in the main configuration to combine the main jui jquery scripts (jquery, noconflict, migrate).

This will reduce the number of scripts getting loaded on a page.

So instead of:

<script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>

You will get:

<script src="/media/jui/js/jquery.with-noconflict.with-migrate.min.js" type="text/javascript"></script>

Depending on whether the noconflict and migrate are required, these are also possible:
jquery.min.js (no extras required)
jquery.with-noconflict.min.js (only noconflict required)
jquery.with-migrate.min.js (only migrate required)

Testing Instructions

Switch on the option in the global configuration and check the html output of the website (both frontend and administrator side).
You should see the new combined script being loaded instead of the separate ones.

Documentation Changes Required

This adds an option to the Global Configuration.
And therefore also adds 2 language strings.

avatar regularlabs regularlabs - open - 3 Jul 2017
avatar regularlabs regularlabs - change - 3 Jul 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jul 2017
Category Administration com_config Language & Strings Libraries JavaScript
avatar brianteeman
brianteeman - comment - 3 Jul 2017

With http2 is it even a good idea to combine the scripts?

avatar CB9TOIIIA
CB9TOIIIA - comment - 3 Jul 2017

Most of the server is still on php 5... this PR is good I think ;)

avatar regularlabs regularlabs - change - 3 Jul 2017
Labels Added: ? ?
avatar regularlabs
regularlabs - comment - 3 Jul 2017

Combining doesn't hurt http2.
But having jQuery.noConflict(); in a separate file (like it is now) makes no sense at all.
With that http2 logic, it would be best to split every line of javascript into it's own file. Which of course is not what we want.

avatar dgt41
dgt41 - comment - 3 Jul 2017

As Brian said this is not a good practice anymore and also personally I tend to remove the migrate part as it is very slow.
So for it worth this is a ?

avatar regularlabs
regularlabs - comment - 3 Jul 2017

Ok, closed

avatar regularlabs regularlabs - change - 3 Jul 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-07-03 10:17:36
Closed_By regularlabs
avatar regularlabs regularlabs - close - 3 Jul 2017

Add a Comment

Login with GitHub to post a comment