I'm working on performance improvements to my site and created a minified version of extlink.js. This saves a bit of bandwidth for users. I've attached a patch for this against the latest D7 dev release.

Comments

attheshow’s picture

StatusFileSize
new3.1 KB
elachlan’s picture

This is a good idea. In principle +1.

elachlan’s picture

Status:Active» Needs review

Changing status to test patch.

elachlan’s picture

Title:Add Minified Version of extlink.js» Add minified version of extlink.js
Status:Needs review» Postponed

Will wait until the rest of the issues are completed, unless we can find an automated way to minify the javascript.

attheshow’s picture

There are a number of tools that can do this. The one my team uses is just a web app. http://jscompress.com/

elachlan’s picture

When I meant automated way, I meant in our code. I used the same site for the 8.x branch.

The problem is, at the moment there are lots of changes being made to the javascript. Which results in more work if a minified js is added. So I am likely to wait until we are ready for the next version and do it then.

elachlan’s picture

Version:7.x-1.12» 7.x-1.x-dev
attheshow’s picture

I just wanted to note that the suggestion of the best practice to minify shipped JS comes from Matt Farina. He talks about it on his blog here: http://engineeredweb.com/blog/why-minify-javascript/

And a couple of years ago at DrupalCon Denver here: http://www.youtube.com/watch?v=wBkzjPT8_Mw

He uses a tool called "uglify" to minify the JS in the Speedy module which a lot of people (including us) use.

I've recently started using a Coda plugin called YUICompress (http://bedrichrios.com/coda2-plugins/). Basically when you make a change to your JS file, you just run the plugin from a menu and it automatically builds the minified version of that JS for you in a couple of seconds. Very easy to use. This is what we use for contrib modules that we maintain as well as custom internal modules. Just thought I'd share.

attheshow’s picture

Issue summary:View changes
StatusFileSize
new4.05 KB

Attached updated patch against 7.x-1.8.

DamienMcKenna’s picture

Status:Postponed» Needs work

Needs to be rerolled, and probably a way of controlling which version is used.