<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VolkomenJuist.nl &#187; Compres</title>
	<atom:link href="http://www.volkomenjuist.nl/blog/tag/compres/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.volkomenjuist.nl/blog</link>
	<description>Juist! Volkomen Juist!</description>
	<lastBuildDate>Mon, 08 Mar 2010 19:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Javascript Compressor</title>
		<link>http://www.volkomenjuist.nl/blog/2009/04/12/javascript-compressor/</link>
		<comments>http://www.volkomenjuist.nl/blog/2009/04/12/javascript-compressor/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 13:33:54 +0000</pubDate>
		<dc:creator>Stefanovich</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Compres]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.volkomenjuist.nl/blog/?p=278</guid>
		<description><![CDATA[When you download JQuery plugins there are often two versions. A &#8216;normal&#8217; version and a compressed (*.min.js) version. The purpose of this compressed file is to speed up your application, especially for slow speed internet connection. A very good website/tool to compress your Javascript files is http://dean.edwards.name/packer/. I tried a couple of files and it [...]]]></description>
			<content:encoded><![CDATA[<p>When you download JQuery plugins there are often two versions. A &#8216;normal&#8217; version and a compressed (*.min.js) version. The purpose of this compressed file is to speed up your application, especially for slow speed internet connection. A very good website/tool to compress your Javascript files is <a href="http://www.volkomenjuist.nl/blog/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2RlYW4uZWR3YXJkcy5uYW1lL3BhY2tlci8=">http://dean.edwards.name/packer/</a>. I tried a couple of files and it will reduce the JavaScript file size with 50%. </p>
<p><span id="more-278"></span><br />
When you need to debug your application it is not very usefull to use the compressed one but in production it really is. To switch very easy from the compressed version to the &#8216;normal&#8217; version and the other way around you can create a static variable where you define the location of the JavaScript file. Use the static variable to add the file to your page/header. Now you can switch versions (normal/compressed) by changing the static variable (in only one file).</p>
<p>JQuery.java:</p>
<pre class="brush: java;">
public static final String JQUERY_BASE = &quot;base/jquery-1.2.6.min.js&quot;;
</pre>
<p>(Wicket) Page:</p>
<pre class="brush: java;">
add(HeaderContributor.forJavaScript(JQuery.class, JQuery.JQUERY_BASE));
</pre>
 <img src="http://www.volkomenjuist.nl/blog/wp-content/plugins/feed-statistics.php?view=1&post_id=278" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.volkomenjuist.nl/blog/2009/04/12/javascript-compressor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
