<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>minify &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/minify/</link>
	<description>Feed of posts on WordPress.com tagged "minify"</description>
	<pubDate>Mon, 30 Nov 2009 18:57:29 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Minify your javascript file with jsmin]]></title>
<link>http://tahsinhasan.wordpress.com/2009/09/15/minify-your-javascript-file-with-jsmin/</link>
<pubDate>Tue, 15 Sep 2009 07:23:00 +0000</pubDate>
<dc:creator>tahsin352</dc:creator>
<guid>http://tahsinhasan.wordpress.com/2009/09/15/minify-your-javascript-file-with-jsmin/</guid>
<description><![CDATA[It will minify the javascript file. We minify javascript files so it will reduce page loading. JSMin]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It will minify the javascript file. We minify javascript files so it will reduce page loading. JSMin first replaces carriage returns (&#8216;\r&#8217;) with linefeeds (&#8216;\n&#8217;). It replaces all other control characters (including tab) with spaces. It replaces comments in the // form with linefeeds. It replaces comments in the /* */ form with spaces. There are many supported programming language available to use jsmin. I used php.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to optimize frontend in Symfony (CSS &amp; JavaScript)]]></title>
<link>http://ksojkotech.wordpress.com/2009/09/06/how-to-optimize-frontend-in-symfony-css-javascript/</link>
<pubDate>Sun, 06 Sep 2009 10:12:27 +0000</pubDate>
<dc:creator>Karol Sójko</dc:creator>
<guid>http://ksojkotech.wordpress.com/2009/09/06/how-to-optimize-frontend-in-symfony-css-javascript/</guid>
<description><![CDATA[What ? If you&#8217;re looking forward to optimize the frontend in your Symfony project or to introd]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3 style="text-align:center;"><img class="aligncenter" title="Minify" src="http://www.webpage-designer.net/wp-content/uploads/2009/06/minify-javascript2.jpg" alt="" width="300" height="200" /></h3>
<h3 style="text-align:justify;">What ?</h3>
<p style="text-align:justify;">If you&#8217;re looking forward to optimize the frontend in your Symfony project or to introduce different CSS or JavaScript versions to each language in your application there&#8217;s a nice plugin that will help you with that. It&#8217;s called <a title="sfMinifyTSPlugin" href="http://www.symfony-project.org/plugins/sfMinifyTSPlugin">sfMinifyTSPlugin</a> and it integrates Google&#8217;s <a title="minify" href="http://code.google.com/p/minify">minify library</a> so you know it&#8217;s good stuff <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h3 style="text-align:justify;">Why ?</h3>
<p style="text-align:justify;">What makes it stand out from the rest of Symfony minify plugins is the fact that you don&#8217;t need to change anything in your .htaccess file or any other server stuff, just an out-of-the-box cool plugin.</p>
<p style="text-align:justify;">The other nice thing about it is that you can implement it either as a filter or with a helper.</p>
<p style="text-align:justify;">The fun part is also that the authors implemented some symfony tasks to help you clear-cache and fix permissions.</p>
<p style="text-align:justify;">The cache files names are generated with a date so you&#8217;ve got all the usefull info about it and speeds up your web application just like that.</p>
<p style="text-align:justify;">So don&#8217;t hesitate to experiment with this cool plugin in your future Symfony applications.</p>
<p style="text-align:justify;"><a href="//static.addtoany.com/js/wordpress_com.js';s.type='text/javascript';void(document.getElementsByTagName('head')[0].appendChild(s));"></a></p>
<p style="text-align:center;"><a href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fksojkotech.wordpress.com%2F2009%2F09%2F06%2Fsymfony-javascript-and-css-optimization%2F&#38;linkname=How%20to%20optimize%20frontend%20in%20Symfony%20(CSS%20%26%20JavaScript)"><img style="border:none;" class="aligncenter" src="http://static.addtoany.com/buttons/share_save_256_24.png" alt="Share" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Minify, Otimizando JS e CSS pelo PHP]]></title>
<link>http://estruturaopen.wordpress.com/2009/09/01/minify-otimizando-js-e-css-pelo-php/</link>
<pubDate>Wed, 02 Sep 2009 01:49:04 +0000</pubDate>
<dc:creator>Alisson S A Nascimento</dc:creator>
<guid>http://estruturaopen.wordpress.com/2009/09/01/minify-otimizando-js-e-css-pelo-php/</guid>
<description><![CDATA[Com tanto Javascript e CSS diferentes que os desenvolvedores baixam e colocam em suas páginas, tais ]]></description>
<content:encoded><![CDATA[Com tanto Javascript e CSS diferentes que os desenvolvedores baixam e colocam em suas páginas, tais ]]></content:encoded>
</item>
<item>
<title><![CDATA[Free Bandwidth For All ASP.NET Users]]></title>
<link>http://somewebguy.wordpress.com/2009/05/09/free-bandwidth-for-all-asp-net-users/</link>
<pubDate>Sat, 09 May 2009 04:50:17 +0000</pubDate>
<dc:creator>webdev_hb</dc:creator>
<guid>http://somewebguy.wordpress.com/2009/05/09/free-bandwidth-for-all-asp-net-users/</guid>
<description><![CDATA[That&#8217;s right, you read it correctly &#8211; free bandwidth. With a very short function we]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>That&#8217;s right, you read it correctly &#8211; <strong>free bandwidth</strong>. With a very short function we&#8217;re going to <a href="http://en.wikipedia.org/wiki/Minify" target="_blank">minify our output.</a></p>
<p><a href="http://www.youtube.com/watch?v=MqSc92uMAbw" target="_blank">Makes me think of a song, but I don&#8217;t want to ruin the rest of the post.</a></p>
<p>When people render their WebForms and MVC Views, they send their finished HTML back down to the page. The HTML contains all the markup required to run in the browser. Every developer knows all this though (and if not&#8230; well&#8230;).</p>
<p>Part of the whole grand ASP.NET pipeline is the <code>Response.Filter</code>. A seemingly innocent property with a lot of potential. Enough boasting about this guy, let&#8217;s get onto the code and see what it can do.</p>
<p>First, you&#8217;re going to need to create a custom stream. I&#8217;m hiding all the inherited members because they aren&#8217;t going to mean much in this example, but don&#8217;t forget that you need them.</p>
<p>With our custom stream, add a hidden property called the UnderlyingStream (honestly call it whatever you want). Lastly, accept a stream in the constructor and assign it to the underlying stream when you instantiate the new stream you&#8217;re building.</p>
<p>Lastly, we&#8217;re going to override <code>.Write()</code> routine to actually minify our output. A couple simple Regular Expressions and we can chop out most of the whitespace.</p>
<pre class="brush: csharp;">
public class MinifyFilter : Stream {

    //inherited members from Stream class - Don't forget
    //See download for more information
    //...

    //The real output stream
    private Stream _UnderlyingStream;

    //Make sure to pass in the current Response.Filter
    public MinifyFilter(Stream stream) {
        this._UnderlyingStream = stream;
    }

    //Override our write event
    public override void Write(byte[] buffer, int offset, int count) {

        //clean out the whitespace characters
        string html = Encoding.UTF8.GetString(buffer);
        html = Regex.Replace(html, @&quot;\n&amp;#124;\t&quot;, &quot; &quot;);
        html = Regex.Replace(html, @&quot;&gt;\s+&lt;&quot;, &quot;&gt;&lt;&quot;).Trim();
        html = Regex.Replace(html, @&quot;\s{2,}&quot;, &quot; &quot;);

        //write the new html
        byte[] output = Encoding.UTF8.GetBytes(html);
        this._UnderlyingStream.Write(output, 0, output.Length);

    }
}
</pre>
<p>This is a very streamlined version of the code that doesn&#8217;t take everything into account. You might want to put some special attention into preventing formatting of text in the &#60;pre&#62; tags or &#60;code&#62; tags, but it&#8217;s a great start.</p>
<p>Now using it is as simple as&#8230;</p>
<pre class="brush: csharp;">
//MVC Example: At the start of a controller action
public ActionResult Index() {
  this.Response.Filter = new MinifyFilter(this.Response.Filter);
  //...rest of the action
  return this.View(); 
}

//WebForms Example: At the Page_Init
protected void Page_Init(object sender, EventArgs e) {
  this.Response.Filter = new MinifyFilter(this.Response.Filter);
  //rest of the Page_Init code
}
</pre>
<p>You could also assign this to a more global event that runs for all requests, but at that point you will need to write code to make sure you don&#8217;t accidentally minify something like an image or a file (things that can&#8217;t be compressed by just removing white-spaces).</p>
<p>You might wonder how much a little script like this would save. The answer is simple &#8211; <em>It depends.</em> Clearly, pages with a lot of white spaces will find a lot more gain. Sometimes it&#8217;s 1 or 2 KBs (which will add up over the course of a month). Sometimes though, especially on larger pages, you can see some real savings.</p>
<p><strong>Here are a few popular sites and their savings</strong></p>
<p><a href="http://www.gamespy.com/" target="_blank">GameSpy</a> 94K &#8211; <em>(84K minified)</em></p>
<p><a href="http://www.stackoverflow.com/" target="_blank">StackOverflow</a> 119K &#8211; <em>(102K minified)</em></p>
<p><a href="http://forums.asp.net/" target="_blank">Forums.ASP.net</a> 222K &#8211; <em>(154K minified)</em></p>
<p><strong>Keep in mind that this code isn&#8217;t bullet-proof</strong>, but instead it&#8217;s here to get you started. You can continue to tweak the <code>.Write()</code> method to make sure that your code behaves the way you would like.</p>
<p>With all the savings you get from the extra bandwidth make sure you remember to send me a Coke Zero!</p>
<p><strong>Source Code</strong></p>
<h2><a href="http://www.hugoware.net/Downloads/Get/MinifyFilter.cs"><span style="color:#3366ff;">Download MinifyFilter.cs</span></a></h2>
<p>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Package Manager File Loader]]></title>
<link>http://brianestes.wordpress.com/2009/05/07/package-manager-file-loader/</link>
<pubDate>Thu, 07 May 2009 21:36:30 +0000</pubDate>
<dc:creator>Brian Estes</dc:creator>
<guid>http://brianestes.wordpress.com/2009/05/07/package-manager-file-loader/</guid>
<description><![CDATA[The package system I originally came up with is getting more complex by the day. First, I wanted to ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The package system I originally came up with is getting more complex by the day. First, I wanted to make sure I could load files.</p>
<p>YAHOO.util.Get solved that easily.</p>
<p>Then I wanted to be able to minify and compress them.</p>
<p>YUI Compressor took care of that.</p>
<p>Finally, I wanted to be able to combine them into single files. Again, not really hard at all. In fact, I just wrote a script that essentially does &#8220;cat file1 file2 file3 &#62; combofile&#8221;.</p>
<p>So, now I have the possibility of:</p>
<p>/js/myscript.js</p>
<p>/js/myscript-min.js</p>
<p>/js/corefiles-combo.js</p>
<p>(I had /js/corefiles-min-combo.js for a while too, but then realized if I wanted it minified, I just needed to make the combo definition include minified files to begin with). See, sometimes things get more simple!</p>
<p>Next, I need to make sure that I only download a file once. So, when I want to dynamically load a new file, I need to make sure I don&#8217;t have the plain version, a minified version or either one of those as part of a combo file.</p>
<p>I&#8217;m only part of the way through this code. No YAHOO.package.manager to save me this time (if I missed it somehow, please let me know!).</p>
<p>So far, I can list all loaded files. I can then strip the &#8220;-min&#8221; off (since, from the program&#8217;s point-of-view, it doesn&#8217;t matter if the file is min&#8217;ed or not). I can also take a -combo file, check the package definitions for what is in that combo file,  then add those files (again, removing the -min) to the list.</p>
<p>Now, I have a &#8220;master&#8221; list of all loaded files, which I can check before trying to load a file.</p>
<p>Next up is to determine if it is faster to add files to this array as I load them or to simply rebuild the entire list every time I load a new package. It seems safer to just rebuild, but sloppy. Keeping track means things could sneak in if a file gets loaded and doesn&#8217;t &#8220;register&#8221; itself with the list tracker.</p>
<p>We&#8217;ll have to wait and see what I come up with.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[One line script to minify js css directory using yuicompressor]]></title>
<link>http://mudy.wordpress.com/2009/02/11/one-line-yuicompressor-script/</link>
<pubDate>Wed, 11 Feb 2009 19:21:24 +0000</pubDate>
<dc:creator>mudy</dc:creator>
<guid>http://mudy.wordpress.com/2009/02/11/one-line-yuicompressor-script/</guid>
<description><![CDATA[The default installation of WordPress use full version of css and javascript library. In order to mi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The default installation of <a href="http://wordpress.org/">WordPress </a> use full version of css and javascript library. In order to minify all of these files, I wrote this bash script to minify all of them. There will be no progress bar while minifying, so be patient.</p>
<pre>
cd wordpress
find -H . -type f -writable  \( -name \*.css -o -name \*.js \)  \
-exec sh -c "yuicompressor {} -o /tmp/yui.tmp &#38;&#38; mv /tmp/yui.tmp {}" \;
</pre>
<p>This will only work under <a href="http://en.wikipedia.org/wiki/POSIX">POSIX </a>system.<br />
<a href="http://www.gnu.org/software/findutils/">Findutils</a> should be included in most popular Linux distros.<br />
<a href="http://developer.yahoo.com/yui/compressor/">Yuicompressor </a>can be downloaded from  <a href="http://www.julienlecomte.net/yuicompressor/">here</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Minify using an ANT target]]></title>
<link>http://vegdave.wordpress.com/2008/10/20/using-minify-ant-target/</link>
<pubDate>Mon, 20 Oct 2008 23:30:21 +0000</pubDate>
<dc:creator>Dave</dc:creator>
<guid>http://vegdave.wordpress.com/2008/10/20/using-minify-ant-target/</guid>
<description><![CDATA[Manually minify files is doable when the files are not changed frequently and you do not have many f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Manually minify files is doable when the files are not changed frequently and you do not have many files to minify. If you have JavaScripts that change frequently due to active development or have a large number of files, you might want to consider to automate it. One way to do so is to use <a href="http://www.ubik-ingenierie.com/ubikwiki/index.php?title=Minifying_JS/CSS">ant target</a> for <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a>. </p>
<p>Here is the configuration that I used to setup the minify. You may wish to change directory/file location and file names to match your environment. You can also update the exclude list (i.e. <code>excludes="/lib/**/**/*.js,**/other_special_file.js"</code>) for correct files that YUI Compressor can not handle. </p>
<pre>
    &#60;target name="-pre-dist"&#62;
    &#60;echo level="info" message="Compressing JavaScript and CSS files...." /&#62;
    &#60;available file="${basedir}/../libs/jars/YUIAnt.jar" property="YUIANT_AVAILABLE" /&#62;
    &#60;fail unless="YUIANT_AVAILABLE" message="Run jar target to generate the required task"/&#62;
    &#60;path id="yuicompressor.classpath"&#62;
        &#60;fileset dir="${basedir}/../libs/jars"&#62;
            &#60;include name="yuicompressor-2.3.6.jar"/&#62;
            &#60;include name="YUIAnt.jar"/&#62;
        &#60;/fileset&#62;
    &#60;/path&#62;
    &#60;taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask"&#62;
        &#60;classpath&#62;
            &#60;path refid="yuicompressor.classpath"/&#62;
        &#60;/classpath&#62;
    &#60;/taskdef&#62;
    &#60;yuicompress linebreak="8000" warn="false" munge="no" preserveallsemicolons="true"
         outputfolder="${basedir}/${build.web.dir}" &#62;
         &#60;fileset dir="${basedir}/web" excludes="/lib/**/**/*.js,**/other_special_file.js" &#62;
             &#60;include name="**/*.js" /&#62;
             &#60;include name="**/*.css" /&#62;
        &#60;/fileset&#62;
    &#60;/yuicompress&#62;
    &#60;echo level="info" message="Compression Complete" /&#62;
    &#60;/target&#62;
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ShrinkSafe with Prototype 1.6]]></title>
<link>http://mpov.wordpress.com/2008/08/21/shrinksafe-with-prototype-16/</link>
<pubDate>Thu, 21 Aug 2008 13:30:57 +0000</pubDate>
<dc:creator>timmorgan</dc:creator>
<guid>http://mpov.wordpress.com/2008/08/21/shrinksafe-with-prototype-16/</guid>
<description><![CDATA[I didn&#8217;t find this information anywhere, so here it is for the Google archives&#8230; To get P]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I didn&#8217;t find this information anywhere, so here it is for the Google archives&#8230;</p>
<p>To get <a href="http://prototypejs.org/">Prototype</a> to run after squeezing it through <a href="http://shrinksafe.dojotoolkit.org/">ShrinkSafe</a>, you need to put back every instance of the variable $super. ShrinkSafe replaces variable names with shortened versions, and because of some Prototype voodoo, it breaks on this one name. There are about 8 places you&#8217;ll find it, and unfortunately, it takes some manual hunting once ShrinkSafe has changed a bunch of names, but there you have it.</p>
<p>I suppose someone smarter than I could tweak ShrinkSafe to ignore this variable name, but for me, this works.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Automatically minify your Javascript and CSS]]></title>
<link>http://scottmoonen.com/2008/08/17/automatically-minify-your-javascript-and-css/</link>
<pubDate>Mon, 18 Aug 2008 02:36:22 +0000</pubDate>
<dc:creator>Scott Moonen</dc:creator>
<guid>http://scottmoonen.com/2008/08/17/automatically-minify-your-javascript-and-css/</guid>
<description><![CDATA[For best performance, it is recommended that you minify the Javascript and CSS that your web applica]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For best performance, it is recommended that you <a href="http://developer.yahoo.com/performance/rules.html#minify"><em>minify</em></a> the Javascript and CSS that your web application uses.  What this involves is removing all unnecessary whitespace and comments.  So, for example, the following CSS:</p>
<pre class="brush: css;">
body
{
  margin: 5px 10px 10px 10px;
  font-family: arial;
}
</pre>
<p>would look like this after being minified:</p>
<pre class="brush: css;">
body{margin:5px 10px 10px 10px;font-family:arial;}
</pre>
<p>And similarly for Javascript.  It is common to configure your server to perform <a href="http://developer.yahoo.com/performance/rules.html#minify">GZip compression</a> on files that it serves, including Javascript and CSS, and this can significantly reduce the time that it takes for browsers to load your pages.  But minification when used with GZip usually helps to compress the files just a little bit further.  And unlike GZip, which only compresses the file only as it is sent over the internet, minification compresses the file as it is seen by a browser.  This allows the browser to parse it faster; additionally, smaller files are more likely to be cached by the browser.</p>
<p>It is common to manually minify your Javascript and CSS as part of deploying your application, saving a minified copy on your server either manually or as part of an automatic deployment script.  But it is also possible to create custom Apache output filters to perform the minification for you.  This gives you the best of both worlds &#8212; you can edit your files directly without their being minified, but you don&#8217;t have to engineer a minification process for when you deploy your application.  Here&#8217;s how to do it, first for Javascript and then for CSS.</p>
<h3>Javascript</h3>
<ol>
<li>
<p>Ensure you have the Apache <a href="http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html">mod_ext_filter extension</a> installed.</p>
</li>
<li>
<p>Download the <a href="http://www.crockford.com/javascript/jsmin.py.txt">jsmin.py</a> Python script from Douglas Crockford&#8217;s website.  (There are also <a href="http://www.crockford.com/javascript/jsmin.html">other languages available</a>.)  Save it in your Python installation&#8217;s site-packages folder (possibly /usr/lib/python2.<em>x</em>/site-packages/).</p>
</li>
<li>
<p>Add the following lines to your main Apache config file (httpd.conf, apache2.conf, etc.):</p>
<pre class="brush: bash;">
&#60;IfModule mod_ext_filter.c&#62;
  ExtFilterDefine jsmin \
                  mode=output \
                  intype=application/x-javascript \
                  outtype=application/x-javascript \
                  cmd=&#34;/usr/bin/python /usr/lib/python2.4/site-packages/jsmin.py&#34;
&#60;/IfModule&#62;
</pre>
</li>
<li>
<p>Add the following statement to the context where you would like to minify your Javascript files (you can place this in your server config, but also within a virtual host configuration, a directory directive, or even a .htaccess file if FileInfo overrides are allowed):</p>
<pre class="brush: bash;">
AddOutputFilter jsmin js
</pre>
<p>This will cause all files with extensions ending in .js to be run through the Javascript minify filter before being sent to a browser.  If you have some Javascript without the .js extension, you can add additional extensions, or you can use the AddOutputFilterByType directive instead to apply the filter to any content with the application/javascript MIME type.  With appropriate <a href="http://httpd.apache.org/docs/2.0/mod/mod_expires.html">mod_expires</a> directives you can cause these files to be cached for a long time by browsers, thereby ensuring that the minify filter is not run more than necessary.</p>
</li>
</ol>
<p>For debugging purposes you should ensure that the minify filter is applied only to your production server and not to your development server.  Until you have verified the correctness of your Javascript it will be harder to locate Javascript errors within minified code!</p>
<h3>CSS</h3>
<ol>
<li>
<p>Ensure you have the Apache <a href="http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html">mod_ext_filter extension</a> installed, as above.</p>
</li>
<li>
<p>Install the cssmin Ruby gem:</p>
<pre>gem install cssmin</pre>
</li>
<li>
<p>Add the following lines to your main Apache config file (httpd.conf, apache2.conf, etc.):</p>
<pre class="brush: bash;">
&#60;IfModule mod_ext_filter.c&#62;
  ExtFilterDefine cssmin \
                  mode=output \
                  intype=text/css \
                  outtype=text/css \
                  cmd=&#34;/usr/bin/ruby -e 'require \&#34;rubygems\&#34;; require \&#34;cssmin\&#34;; puts CSSMin.minify(STDIN)'&#34;
&#60;/IfModule&#62;
</pre>
</li>
<li>
<p>Add the following statement to the context where you would like to minify your CSS files (you can place this in your server config, but also within a virtual host configuration, a directory directive, or even a .htaccess file if FileInfo overrides are allowed):</p>
<pre class="brush: bash;">
AddOutputFilter cssmin css
</pre>
<p>This will cause all files with extensions ending in .css to be run through the CSS minify filter before being sent to a browser.  If you have some CSS without the .css extension, you can add additional extensions, or you can use the AddOutputFilterByType directive instead to apply the filter to any content with the text/css MIME type.  With appropriate <a href="http://httpd.apache.org/docs/2.0/mod/mod_expires.html">mod_expires</a> directives you can cause these files to be cached for a long time by browsers, thereby ensuring that the minify filter is not run more than necessary.</p>
</li>
</ol>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CSS e Javascript minify]]></title>
<link>http://hlibco.wordpress.com/2008/05/13/css-minify-javascript-minify/</link>
<pubDate>Tue, 13 May 2008 23:49:14 +0000</pubDate>
<dc:creator>hlibco</dc:creator>
<guid>http://hlibco.wordpress.com/2008/05/13/css-minify-javascript-minify/</guid>
<description><![CDATA[Apesar de eu ter criado minha própria classe de Minify de CSS, não irei postá-la aqui neste momento,]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Apesar de eu ter criado minha própria classe de Minify de CSS, não irei postá-la aqui neste momento, mas sim, irei indicar alguns sites e classes que fazem o Minify de CSS e outros que trabalham com Javascript.</p>
<p><strong>MINIFY JAVASCRIPT</strong></p>
<p><a title="Minify Javascript" href="http://www.compressjavascript.com/" target="_blank">http://www.compressjavascript.com/</a></p>
<p><a title="Minify Javascript" href="http://fmarcia.info/jsmin/test.html" target="_blank">http://fmarcia.info/jsmin/test.html</a></p>
<p><strong>MINIFY CSS (usando PHP)</strong></p>
<p><a title="Minify CSS" href="http://www.vladimirated.com/web-development-minify-css-using-php-and-cssmin-class" target="_blank">http://www.vladimirated.com/web-development-minify-css-using-php-and-cssmin-class</a></p>
<p><strong>MINIFY JAVASCRIPT e CSS</strong></p>
<p><a title="Minify Javascript e CSS" href="http://code.google.com/p/minify/wiki/UserGuide" target="_blank">http://code.google.com/p/minify/wiki/UserGuide</a></p>
<p><strong>MINIFY JAVASCRIPT, CSS e HTML (usando PHP)</strong></p>
<p><a title="Minify CSS, Javascript e HTML" href="http://aciddrop.com/2008/01/21/boost-your-website-load-time-with-3-lines-of-code/" target="_blank">http://aciddrop.com/2008/01/21/boost-your-website-load-time-with-3-lines-of-code/</a></p>
<p>Já que não sou expert na área de Tunning e Boost Performance, será que alguém pode explicar o caso de uso abaixo?</p>
<p>Dado que possuímos 5 arquivos JS já minificados, cada um possuindo 50Kb, temos 5 HTTP-Request e a transferência de 250Kb totais. É mais válido manter esse número de requests (comprometendo o load time), ou unir todos estes arquivos em 1 só de 250Kb, e comprometer toda a página já que arquivos grandes ficam mais vulneráveis a falhas de transferência de pacotes?</p>
<p>Minha grande dúvida é: Existe algum tamanho ótimo de arquivo JS e de CSS? (Sem ser os recomendados pelo Web Site Optimization &#8211; os quais considero difícies de serem atingidos)</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
