Developer forum
E-mail notifications
getimage.aspx for css and js
(link rel="stylesheet" type="text/css" href="/admin/public/minify.aspx?file=mystylesheet.css")
or
(script src="/admin/public/minify.aspx?file=myscripts.js" type="text/javascript")(/script)
In that way you can still edit your css and js-files directly on the server, without having to go through some minifying app, and then uploading the new minified files to the server.
This could also make room for a LESS or SASS compiler :)
Replies
That's a brilliant idea. I was struggling to find a way to suggest such a tool and your approach is simply perfect. Let's see if the dw guys think so too :P
Could also be great if it could take some parameters and minify more than 1 file or a feature in the backend that would minify all js and css files in the head.
Nuno
This would be a pretty cool and useful feature for optimizing performance.
Hi guys,
I've just posted an article on my blog describing the functionality that you're looking for:
http://volpav.wordpress.com/2011/03/28/combine-and-compress-your-stylesheet-and-script-files/
-- Pavel
Went from F grade to B grade on compression with it.
Pavel, there's only one problem, the validator W3 could not validate the code:
Warning Line 13, Column 73: cannot generate system identifier for general entity "BasePath"
Error Line 13, Column 73: general entity "BasePath" not defined and no default entity
Error Line 13, Column 81: reference to entity "BasePath" for which no system identifier could be generated
Error Line 13, Column 118: general entity "Files" not defined and no default entity
Is there anything to do about that?
If you're using method #2 then it's our problem - will fix it asap.
I'll edit my post to reflect this change.
-- Pavel
(It said in the validator that the problem was an unencoded ambersand anyway).
From what I noticed, the handler basically merges files together. Is there a parameter that would engage minification?
Nuno
Currently there is no support for minification. But I will associate a new work item with your feature request.
-- Pavel
That would be perfect. Thanks a lot.
Nuno
Hi Pavel, did you get to the minification part of this? I know Nuno and his team did a really great solution themselves, which it sounded like they already sent to you guys to just drop into all installations... Could we please have that one installed instead/too?