You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by karthikeyan <su...@yahoo.co.in> on 2011/06/02 08:13:54 UTC

I need the comments in the scripts to be omitted at the time of building war files

I have noted that JavaScript files that contain lots of comments take longer
(and more bandwidth) to fetch from the web server to the client's browser
session. By stripping out the comments at build time the files will load
quicker and increase the speed of rendering. Can any one let me know the way
i can omit adding comments at the time of building war files

--
View this message in context: http://ant.1045680.n5.nabble.com/I-need-the-comments-in-the-scripts-to-be-omitted-at-the-time-of-building-war-files-tp4447231p4447231.html
Sent from the Ant - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: I need the comments in the scripts to be omitted at the time of building war files

Posted by Andy Stevens <in...@googlemail.com>.
Run the file through a javascript compressor and include the
compressed versions in the war instead of the originals?
For example, the YUI Compressor
(http://developer.yahoo.com/yui/compressor/) can be run with a <java>
task, or there's an Ant task wrapper for it at
http://code.google.com/p/javaflight-code/wiki/YuiCompressorAntTask


Andy
-- 
http://pseudoq.sourceforge.net/

On 2 June 2011 06:13, karthikeyan <su...@yahoo.co.in> wrote:
> I have noted that JavaScript files that contain lots of comments take longer
> (and more bandwidth) to fetch from the web server to the client's browser
> session. By stripping out the comments at build time the files will load
> quicker and increase the speed of rendering. Can any one let me know the way
> i can omit adding comments at the time of building war files

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org