Feature request: Minification of minification -Performance improvements for themes
Reported by Imran | August 11th, 2011 @ 06:47 PM | in 2.0.5 (closed)
At least 5 requests for javascript files need to be made:
1) YUI2 js files
2) YUI3 js loader
3) src files in {script} tag for view templates
4) the individual theme's js files
5) exponent.js.php
This is 4 too many. As for the first 4, they can easily be combined into one:
1) I recommend in expJavascript, combine the YUI2, YUI3 and src
files that are passed to the minifier in one shot rather than
separating them out. i.e. the same as what is done in the CSS
minifier in expCSS.
2) Also in expTheme::head you can define an optional array of
javascript files for your specific theme which can also be then
passed on to the minifier in expJavascript. Alternatively you could
simply pick up all the files that are located in /themes/mytheme/js
and minify them along with the other JS files. This second solution
would make it consistent for themers because they know that the css
directory files in my theme are stitched to the site css's and the
js directory files are stitched to the site js's.
This will cut down the 5 requests to 2 (assuming it stays below the 1500 character limit).
Comments and changes to this ticket
-
expNinja February 12th, 2012 @ 07:17 PM
(from [5851d7043039f7fe379fa80ef02c389ce9f8a3a2]) Minfies inline css & js, esp that at the end of the file [#299] https://github.com/exponentcms/exponent-cms/commit/5851d7043039f7fe...
-
expNinja February 18th, 2012 @ 03:33 PM
- Assigned user set to dleffler
- Milestone set to 2.0.5
- Milestone order changed from 93 to 0
(from [b3212666dbc441f668caa2d5d7bd45e24ccaad4f]) Attempts to enhance & fix minify; adds minfying non-yui linked scripts, adds additional site configuration options to turn off various types of minification (linked/inline css/js, yui2/3) [#299 #542 milestone:2.0.5 responsible:dleffler] https://github.com/exponentcms/exponent-cms/commit/b3212666dbc441f6...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS
Tags
Referenced by
- 542 Bug: Minify broken on some servers (from [b3212666dbc441f668caa2d5d7bd45e24ccaad4f]) Attempt...