PDA

View Full Version : XF Optimise 0.0.3



s0ct0j0c
21-04-2011, 02:14 PM
Based on the now defunct (http://xenforo.com/community/threads/xf-optimise.14021/)vB4 SuperCharged (http://www.vbulletin.org/forum/showthread.php?t=229608), this addon does a few things to improve your Page Speed score as well as overall responsiveness.

Features:



Minify all Javascript with UglifyJS (https://github.com/mishoo/UglifyJS) (beats even Closure Compiler)
Defer Javascript loading (moves script tags to before </body>)
Minify HTML (not really recommended, but you can give it a try http://xenforomods.info/styles/default/xenforo/smilies/tongue.png)

Installation:


Upload contents of upload folder to your forum root.
Ensure the directories /js and /js-old are writeable by PHP (chmod or otherwise).
Install addon-XFOptimise.xml file.
Go to ACP > Applications > Minify Javascript and wait for around 30 seconds for it to complete the minification process. May take longer since each file must be send to and processed individually by my server.
If you are running nginx (if not, you should be http://xenforomods.info/styles/default/xenforo/smilies/wink.png), see here (http://wiki.nginx.org/NginxHttpGzipStaticModule) to take advantage of the .gz files.

Please note that this overwrites all .js files in /js, though a backup is created in /js-old.

Also you should run the Minify Javascript process again after upgrading XenForo or installing addons with Javascript included.

Update: (0.0.x to 0.0.3)


Upload contents of upload folder to your forum root, overwriting all files.
Upgrade addon using addon-XFOptimise.xml file.
Regardless of whether you had issues previously, please re-run Minify Javascript as previous versions missed a lot of files.

Changelog:

0.0.3: (22/03/2011)


Switched to a more reliable file iterator (SPL extension required now).
Fixed permissions issue (only superadmins had access, now controlled with 'option' flag as previously intended).

0.0.2: (22/03/2011)


Possibly fixed array_merge error in Minify Javascript function.

0.0.1: (21/03/2011)


Initial release