<?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># Defining Chaos In Order &#187; Webdevelopment</title>
	<atom:link href="http://mattiasgeniar.be/category/webdevelopment/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattiasgeniar.be</link>
	<description>Tips, Tricks &#38; Rants of a Sys Admin</description>
	<lastBuildDate>Fri, 30 Jul 2010 08:09:03 +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>&#8220;Show Full Processlist;&#8221; Equivalent Of MySQL For PostgreSQL</title>
		<link>http://mattiasgeniar.be/2010/02/23/show-full-processlist-equivalent-of-mysql-for-postgresql/</link>
		<comments>http://mattiasgeniar.be/2010/02/23/show-full-processlist-equivalent-of-mysql-for-postgresql/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:53:27 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[pg_stat_activity]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[psql]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1819</guid>
		<description><![CDATA[MySQL has a very powerfull command through &#8220;show full processlist;&#8221;, to see a list of currently running queries. # mysql # mysql &#62; show full processlist; PostgreSQL has a similar shell to MySQL, named psql. Here&#8217;s how it works. First, &#8230; <a href="http://mattiasgeniar.be/2010/02/23/show-full-processlist-equivalent-of-mysql-for-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>MySQL has a very powerfull command through &#8220;show full processlist;&#8221;, to see a list of currently running queries.</p>
<blockquote><p># mysql<br />
# mysql &gt; show full processlist;</p></blockquote>
<p>PostgreSQL has a similar shell to MySQL, named <a href="http://www.postgresql.org/docs/6.4/static/app-psql.htm" onclick="pageTracker._trackPageview('/outgoing/www.postgresql.org/docs/6.4/static/app-psql.htm?referer=');">psql</a>. Here&#8217;s how it works. First, change to the postgres user.</p>
<blockquote><p># su postgres</p></blockquote>
<p>Enter the PostgreSQL command shell.</p>
<blockquote><p># [postgres@srv]$ psql</p></blockquote>
<p>And perform the query to see the current activity.</p>
<blockquote><p>postgres=# select * from pg_stat_activity;</p></blockquote>
<p>To quit the PostgreSQL shell, type <strong>&#8220;\q&#8221;<span style="font-weight: normal;">.</span></strong></p>
<p>This requires you have PostgreSQL configured to enable logging.  Edit your PostgreSQL config file (usually at <em>/usr/local/pgsql/data/postgresql.conf</em>), and add the following line.</p>
<blockquote><p>stats_command_string = true</p></blockquote>
<p>And reload your PostgreSQL.</p>
<blockquote><p>pg_ctl reload</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2010/02/23/show-full-processlist-equivalent-of-mysql-for-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;See Pricing&#8221;, Your Marketing Tip Of The Week!</title>
		<link>http://mattiasgeniar.be/2009/07/22/see-pricing-your-marketing-tip-of-the-week/</link>
		<comments>http://mattiasgeniar.be/2009/07/22/see-pricing-your-marketing-tip-of-the-week/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 16:35:22 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[psychology]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1700</guid>
		<description><![CDATA[Now this is interesting. He said that they tested various phrases on the Highrise homepage for the call-to-action button. They originally had used various permutations of “Free Trial” and “Sign-up for Free Trial”. Then they tested the phrase: “See Plans and Pricing”. &#8230; <a href="http://mattiasgeniar.be/2009/07/22/see-pricing-your-marketing-tip-of-the-week/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>Now <a href="http://carsonified.com/blog/business/how-to-increase-sign-ups-by-200-percent/" onclick="pageTracker._trackPageview('/outgoing/carsonified.com/blog/business/how-to-increase-sign-ups-by-200-percent/?referer=');">this is interesting</a>.</p>
<blockquote><p>He said that they tested various phrases on the Highrise homepage for the call-to-action button. They originally had used various permutations of “Free Trial” and “Sign-up for Free Trial”. Then they tested the phrase: <strong>“See Plans and Pricing”. </strong>This resulted in a <strong>200% increase in sign-ups</strong>. That’s right. 200%.</p></blockquote>
<p>Just another case where it makes you wonder, how much <a href="http://mattiasgeniar.be/2009/05/30/are-we-in-control-of-our-own-decisions/">we&#8217;re being manipulated in web interactions</a> &#8230;</div>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2009/07/22/see-pricing-your-marketing-tip-of-the-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get It While It&#8217;s Hot: FireFox 3.5</title>
		<link>http://mattiasgeniar.be/2009/07/01/get-it-while-its-hot-firefox-35/</link>
		<comments>http://mattiasgeniar.be/2009/07/01/get-it-while-its-hot-firefox-35/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 06:00:37 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1675</guid>
		<description><![CDATA[It&#8217;s out! Enjoy the cool HTML5 features, and improved performance!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mozilla-europe.org/en/" onclick="pageTracker._trackPageview('/outgoing/www.mozilla-europe.org/en/?referer=');">It&#8217;s out!</a> Enjoy the cool HTML5 features, and improved performance!</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2009/07/01/get-it-while-its-hot-firefox-35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running IE6, IE7, IE8, FF 2, FF 3, Chrome, Opera &amp; Safari</title>
		<link>http://mattiasgeniar.be/2009/05/11/running-ie6-ie7-ie8-ff-2-ff-3-chrome-opera-safari/</link>
		<comments>http://mattiasgeniar.be/2009/05/11/running-ie6-ie7-ie8-ff-2-ff-3-chrome-opera-safari/#comments</comments>
		<pubDate>Mon, 11 May 2009 15:05:10 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[ie8]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1652</guid>
		<description><![CDATA[I stumbled upon this marvelous creation, allowing you to run both Internet Explorer 6 (IE6), Internet Explorer 7 (IE7), Internet Explorer 8 (IE8), Mozilla Firefox 2 (FF2), Mozilla Firefox 3 (FF3), Google&#8217;s Chrome (1), Opera &#38; Apple&#8217;s Safari on one computer. It &#8230; <a href="http://mattiasgeniar.be/2009/05/11/running-ie6-ie7-ie8-ff-2-ff-3-chrome-opera-safari/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I stumbled upon this marvelous creation, allowing you to run both Internet Explorer 6 (<strong>IE6</strong>), Internet Explorer 7 (<strong>IE7</strong>), Internet Explorer 8 (<strong>IE8</strong>), Mozilla Firefox 2 (<strong>FF2</strong>), Mozilla Firefox 3 (<strong>FF3</strong>), Google&#8217;s Chrome (1), Opera &amp; Apple&#8217;s Safari on one computer. It requires you to visit a website, from where you can launch these applications. It&#8217;s brilliantly simple.</p>
<p><img class="aligncenter size-full wp-image-1653" title="browser_launch" src="http://mattiasgeniar.be/wp-content/uploads/2009/05/browser_launch.jpg" alt="browser_launch" width="699" height="306" /></p>
<p>Check it out: <a href="http://www.xenocode.com/browsers/" onclick="pageTracker._trackPageview('/outgoing/www.xenocode.com/browsers/?referer=');">http://www.xenocode.com/browsers/</a></p>
<p>It sure beats having to run a <a href="http://www.microsoft.com/windows/virtual-pc/default.aspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windows/virtual-pc/default.aspx?referer=');">Virtual PC</a> with several <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&amp;displaylang=en" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF_amp_displaylang=en&amp;referer=');">seperate images (XP + IE6, XP + IE7, XP + IE8)</a>. If you want to try out different operating systems (XP or Vista), you should still revert to virtualising your OS (try <a href="http://www.microsoft.com/windows/virtual-pc/default.aspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windows/virtual-pc/default.aspx?referer=');">Virtual PC</a> + <a href="http://www.microsoft.com/windows/virtual-pc/default.aspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windows/virtual-pc/default.aspx?referer=');">premade OS</a> images by Microsoft). Now to find a solution for running IE5.5 alongside it! ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2009/05/11/running-ie6-ie7-ie8-ff-2-ff-3-chrome-opera-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word HTML: Get a Hint &#8230;</title>
		<link>http://mattiasgeniar.be/2009/03/16/word-html-get-a-hint/</link>
		<comments>http://mattiasgeniar.be/2009/03/16/word-html-get-a-hint/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 20:00:55 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[word]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1555</guid>
		<description><![CDATA[Here&#8217;s one of the features of Dreamweaver, to clean up the &#8220;HTML&#8221; (do mind the quotes!) that Microsoft&#8217;s Word generates when saving a document as a webpage file.  And its purpose is clear; transform the why-do-they-even-call-it-HTML-code that Word generates, to &#8230; <a href="http://mattiasgeniar.be/2009/03/16/word-html-get-a-hint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s one of the features of Dreamweaver, to clean up the &#8220;HTML&#8221; (do mind the quotes!) that Microsoft&#8217;s Word generates when saving a document as a webpage file. </p>
<div id="attachment_1556" class="wp-caption aligncenter" style="width: 302px"><img class="size-full wp-image-1556" title="clean-up-word-command" src="http://mattiasgeniar.be/wp-content/uploads/2009/03/clean-up-word-command.png" alt="Clean up Word HTML" width="292" height="339" /><p class="wp-caption-text">Clean up Word HTML</p></div>
<p>And its purpose is clear; transform the why-do-they-even-call-it-HTML-code that Word generates, to a manageable and W3C compliant version. I suppose this results just sums it all up.</p>
<div id="attachment_1557" class="wp-caption aligncenter" style="width: 325px"><img class="size-full wp-image-1557" title="clean-up-word-complete" src="http://mattiasgeniar.be/wp-content/uploads/2009/03/clean-up-word-complete.png" alt="Clean up Word HTML Results" width="315" height="230" /><p class="wp-caption-text">Clean up Word HTML Results</p></div>
<p>In case you&#8217;ve never done this before; take a random Word document, and save it as a .HTML file through the &#8220;save as&#8221; menu in Word. Then look at the HTML code behind that page. See if you can decypher any proper HTML tags &#8230;</p>
<p>Its results are often noticed when trying to copy/paste Word text to an online text editor. It&#8217;ll copy the underlying Word HTML characters as well, that often break the layout of pages.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2009/03/16/word-html-get-a-hint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web 2.0 Doesn&#8217;t Exist, You Schmuck</title>
		<link>http://mattiasgeniar.be/2009/01/11/web-20-doesnt-exist-you-schmuck/</link>
		<comments>http://mattiasgeniar.be/2009/01/11/web-20-doesnt-exist-you-schmuck/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 18:42:22 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1298</guid>
		<description><![CDATA[The Web 2.0 is wrongfully used all too often. Besides the obvious (the fact that &#8220;The Web&#8221; doesn&#8217;t exist, and a 2.0 version *can&#8217;t* exist either), it&#8217;s implying something it shouldn&#8217;t. The &#8220;Web&#8221; didn&#8217;t evolve, the developers did. Hooray for (Web)developer &#8230; <a href="http://mattiasgeniar.be/2009/01/11/web-20-doesnt-exist-you-schmuck/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Web_2.0" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Web_2.0?referer=');">Web 2.0</a> is wrongfully used all too often. Besides the obvious (the fact that &#8220;<em>The Web</em>&#8221; doesn&#8217;t exist, and a 2.0 version *<em>can&#8217;t</em>* exist either), it&#8217;s implying something it shouldn&#8217;t. The &#8220;Web&#8221; didn&#8217;t evolve, the <strong>developers</strong> did.</p>
<p>Hooray for (<strong>Web</strong>)<strong>developer 2.0</strong>.<span id="more-1298"></span></p>
<p>&#8220;Web 2.0&#8243; seems to refer mainly to the use of AJAX, and user-generated content on webpages. The act of (re)loading content, without (re)loading the webpage &#8211; and to allow users to be more responsive, and interact more with the website. Places like Wikipedia or Social Networks &#8211; facebook, myspace &#8211; make advanced use of this.</p>
<p>This couldn&#8217;t be possible, without the Developer-That-Thought-Outside-Of-The-Box. The upgraded version. The 2.0.</p>
<p>AJAX, or <a href="http://en.wikipedia.org/wiki/Asynchronous_Javascript_and_XML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Asynchronous_Javascript_and_XML?referer=');">Asynchronous JavaScript and XML</a>, has been around for well over 10 years now. It uses the Javascript object &#8220;<a href="http://en.wikipedia.org/wiki/XMLHttpRequest" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XMLHttpRequest?referer=');">XMLHttpRequest</a>&#8221; to get the content (originally XML) of an outside page. This was introduced in Internet Explorer 5.0. You read it &#8211; <strong>IE 5.0</strong>.</p>
<p>But it didn&#8217;t even need this XMLHttpRequest object. Before IE 5.0, content-reloads could have been perfectly handled through a Hidden Frame and some Javascript.</p>
<p>How can the term &#8220;Web 2.0&#8243; then be used to &#8220;announce a new era of webdevelopment&#8221;, when that era was already well on its way?</p>
<p>The Web (technology) in itself hardly evolved, but the Developers started to think of new and exciting ways to use these already available technologies. Frameworks such as <a href="http://script.aculo.us/" onclick="pageTracker._trackPageview('/outgoing/script.aculo.us/?referer=');">Scriptaculous</a>, <a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');">jQuery</a>, <a href="http://mootools.net/" onclick="pageTracker._trackPageview('/outgoing/mootools.net/?referer=');">MooTools</a>, &#8230; were all built with old technology.</p>
<p>Technology hardly changed. We -as developers &#8211; did. Hooray for (<strong>Web</strong>)<strong>developer 2.0.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2009/01/11/web-20-doesnt-exist-you-schmuck/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get Rid Of The &#8216;WWW&#8217; Prefix &#8211; It&#8217;s Long Overdue</title>
		<link>http://mattiasgeniar.be/2008/11/29/get-rid-of-the-www-prefix-its-long-overdue/</link>
		<comments>http://mattiasgeniar.be/2008/11/29/get-rid-of-the-www-prefix-its-long-overdue/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 18:00:37 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=1221</guid>
		<description><![CDATA[To understand why the &#8220;WWW&#8221; prefix or subdomain is outdated, we should first look at the original definition of WWW. World Wide Web:  n. Abbr. WWW  1) The complete set of documents residing on all Internet servers that use the HTTP &#8230; <a href="http://mattiasgeniar.be/2008/11/29/get-rid-of-the-www-prefix-its-long-overdue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To understand why the &#8220;<strong>WWW</strong>&#8221; prefix or subdomain is outdated, we should first look at the original definition of <a href="http://en.wikipedia.org/wiki/World_Wide_Web" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/World_Wide_Web?referer=');">WWW</a>.</p>
<blockquote><p><strong>World Wide Web</strong>: <br />
n. Abbr. <strong>WWW</strong> <br />
1) The complete set of documents residing on all Internet servers<strong> that use the HTTP protocol</strong>, accessible to users via a simple point-and-click system. <br />
2) n : a collection of internet sites that offer text and graphics and sound and animation resources through the hypertext transfer protocol.</p></blockquote>
<p>The important part here is the HTTP Protocol. Whenever a link is made, such as http://&lt;domain&gt;, the software will know that a connection to a webserver is made, on port 80. That&#8217;s what the http-protocol stands for.</p>
<p>The definition above implies that the &#8220;World Wide Web&#8221; uses the http protocol to send its data. Why then, do we still need to add the &#8220;WWW&#8221; subdomain? It&#8217;s a waste of time to type it. Wouldn&#8217;t it be easier to just type in the domain name, without the &#8220;WWW&#8221;?</p>
<p>While most webservers will accept traffic on the domain-name, without the WWW prefix, they usually redirect to the WWW-part of the website. Typing http://&lt;domain&gt; will often land you on http://www.&lt;domain&gt;. This should be the other way around.</p>
<p>Using the following <a href="http://en.wikipedia.org/wiki/Htaccess" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Htaccess?referer=');">.htaccess</a> rule, you can safely redirect all traffic from http://<strong>www</strong>.&lt;domain&gt; to the http://&lt;domain&gt; version of your website.</p>

<div class="wp_syntax"><div class="code"><pre class="reg" style="font-family:monospace;">Options +FollowSymlinks
RewriteEngine on
# Remove the WWW subdomain, and redirect to the domain itself
RewriteCond %<span style="color: #000000;">&#123;</span>http_host<span style="color: #000000;">&#125;</span> ^www\.domain\.com <span style="color: #000000;">&#91;</span>NC<span style="color: #000000;">&#93;</span>
RewriteRule ^<span style="color: #000000;">&#40;</span>.*<span style="color: #000000;">&#41;</span>$ http://domain.com/$1 <span style="color: #000000;">&#91;</span>R<span style="color: #000000;">=</span>301,NC<span style="color: #000000;">&#93;</span></pre></div></div>

<p>For more information on what Redirect-Code to use ([R=301]) I kindly refer you to the following page: <a href="http://mattiasgeniar.be/php/using-proper-header-redirects-in-php/">Using Proper Header Redirects In PHP</a>. There you&#8217;ll find a good explanation on the difference in 301 and 302 redirects, and their effect on search engines.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/11/29/get-rid-of-the-www-prefix-its-long-overdue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google&#8217;s Chrome Won&#8217;t Hurt IE &#8211; Only FireFox</title>
		<link>http://mattiasgeniar.be/2008/11/22/googles-chrome-wont-hurt-ie-only-firefox/</link>
		<comments>http://mattiasgeniar.be/2008/11/22/googles-chrome-wont-hurt-ie-only-firefox/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 11:41:50 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://mattiasgeniar.be/?p=1237</guid>
		<description><![CDATA[According to a post on ArsTechnica.com, it seems Google is ready to release its new browser to the world, by setting it as a default browser on new computers. Google, meanwhile, is exploring its distribution options and examining the various &#8230; <a href="http://mattiasgeniar.be/2008/11/22/googles-chrome-wont-hurt-ie-only-firefox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>According to a post on ArsTechnica.com, it seems Google is ready to release its <a href="http://www.google.com/chrome" onclick="pageTracker._trackPageview('/outgoing/www.google.com/chrome?referer=');">new browser</a> to the world, by setting it as <a href="http://arstechnica.com/news.ars/post/20081121-google-may-offer-chrome-detailing-on-new-pcs.html" onclick="pageTracker._trackPageview('/outgoing/arstechnica.com/news.ars/post/20081121-google-may-offer-chrome-detailing-on-new-pcs.html?referer=');">a default browser on new computers</a>.</p>
<blockquote><p>Google, meanwhile, is exploring its distribution options and examining the various ways it might improve its market share. &#8220;We will probably do distribution deals,” Pinchai told <em>The Times</em>. &#8220;We could work with an OEM (Original Equipment Manufacturer) and have them ship computers with Chrome preinstalled.&#8221;</p></blockquote>
<p>By preinstalling the browser on new computers, you&#8217;ll reach a relativily small percentage of internet users out there. It might replace IE for some users, but those who are scared of changes (and that&#8217;s just about every PC user with little or no knowledge of IT) will return to Internet Explorer &#8211; their safehaven, the software they know and have used for several years. It&#8217;s proven to work &#8211; why would they switch to something else?</p>
<p>Those people that use FireFox (a 20% marketshare at the moment), have made the step from Internet Explorer to try the new browser. They are the ones that _do_ like change, so they switched. That 20% marketshare is probably the only share that&#8217;ll considder using Google&#8217;s Chrome. </p>
<p>By further promoting it, the Chrome browser will only steal marketshare of the &#8220;alternative&#8221; browsers &#8211; FireFox, Safari, Opera, &#8230; &#8211; not the mainstream Internet Explorer users causing more diversity.</p>
<blockquote><p>Since the launch of IE3 in 1996 to today, Microsoft has never had to compete for browser share against a company as large and powerful as itself. Once Chrome launches, that&#8217;s going to change; Google has the money and the expertise to match Microsoft dollar-for-dollar and feature-for-feature. If both companies stay on track, 2009 may be the year we finally test John Curran&#8217;s hypothesis, both in the UK and around the world.</p></blockquote>
<p>I&#8217;m curious to see how that will go. If spending money only means getting the browser preinstalled, then the war will still be won by IE. If it means tearing down IE&#8217;s reputation through public ads, commercials and likes &#8211; to get to the &#8220;common&#8221; man, who&#8217;s afraid of change &#8211; it might tilt the other way around.</p>
<p>If I look at my immediate surroundings, those users that still used Internet Explorer a few months ago, are using it now. Those that had FireFox/Safari/Opera, made the switch to Chrome.</p>
<p>I was ones a FireFox user. I switched to Chrome.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/11/22/googles-chrome-wont-hurt-ie-only-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fennec Alpha &#8211; Just Like The Other Fox</title>
		<link>http://mattiasgeniar.be/2008/10/18/fennec-alpha-just-like-the-other-fox/</link>
		<comments>http://mattiasgeniar.be/2008/10/18/fennec-alpha-just-like-the-other-fox/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 12:26:02 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[fennec]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[fox]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=1049</guid>
		<description><![CDATA[Mozilla has released an alpha version of Fennec, the mobile version of the popular Firefox. It already looks promising, with more screenspace for the actual content, and less overhaul through massive menu-items, extra buttons, &#8230; It&#8217;s nice to see titlebar &#8230; <a href="http://mattiasgeniar.be/2008/10/18/fennec-alpha-just-like-the-other-fox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mozilla has released an alpha version of <a href="http://www.mozilla.org/projects/fennec/1.0a1/releasenotes/" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.org/projects/fennec/1.0a1/releasenotes/?referer=');">Fennec</a>, the mobile version of the popular <a href="http://www.mozilla.com/en-US/firefox/" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.com/en-US/firefox/?referer=');">Firefox</a>. It already looks promising, with more screenspace for the actual content, and less overhaul through massive menu-items, extra buttons, &#8230;</p>
<p>It&#8217;s nice to see titlebar disappear as you scroll down the site, to create more space to view your websites &#8211; as well as the new way of showing tabs &amp; other browser options.<span id="more-1049"></span></p>
<p><a href="http://www.mattiasgeniar.be/wp-content/uploads/2008/10/fennec.png" onclick="pageTracker._trackPageview('/outgoing/www.mattiasgeniar.be/wp-content/uploads/2008/10/fennec.png?referer=');"><img class="alignleft size-medium wp-image-1050" style="border: 0pt none; margin: 4px 6px;" title="fennec" src="http://www.mattiasgeniar.be/wp-content/uploads/2008/10/fennec.png" alt="" width="86" height="76" /></a>The only downside at this point, is that only the Nokia n810 is supported as a mobile device. I&#8217;ll be curious to see how it reacts on HTC models and Windows Mobile. If you want, you can try it out on your <a href="http://www.mozilla.org/projects/fennec/1.0a1/releasenotes/#install" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.org/projects/fennec/1.0a1/releasenotes/_install?referer=');">desktop pc, mac or linux</a>.</p>
<p>There&#8217;s a video available showing <a href="http://vimeo.com/1981300?pg=embed&amp;sec=1981300" onclick="pageTracker._trackPageview('/outgoing/vimeo.com/1981300?pg=embed_amp_sec=1981300&amp;referer=');">a quick walkthrough</a> with the biggest features of Fennec, by one of the user-experience designers.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/10/18/fennec-alpha-just-like-the-other-fox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;If It Ain&#8217;t Broken, Don&#8217;t Fix It&#8221;</title>
		<link>http://mattiasgeniar.be/2008/09/18/if-it-aint-broken-dont-fix-it/</link>
		<comments>http://mattiasgeniar.be/2008/09/18/if-it-aint-broken-dont-fix-it/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 18:00:14 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[ie5]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=708</guid>
		<description><![CDATA[A common phrase in IT, usually uttered when someone tries to do something which you _know_ will end badly, because they&#8217;re trying to change something that doesn&#8217;t need changing in the first place. The expression also causes us the necessary &#8230; <a href="http://mattiasgeniar.be/2008/09/18/if-it-aint-broken-dont-fix-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A common phrase in IT, usually uttered when someone tries to do something which you _know_ will end badly, because they&#8217;re trying to change something that doesn&#8217;t need changing in the first place.</p>
<p>The expression also causes us the necessary frustrations: people hold on to (very) old versions of software (Internet Explorer 5, Windows 98, &#8230;) because &#8220;<strong>it still works</strong>&#8220;. How are we to use new technologies and methods, when there are still a lot of end-users that <a title="Get Upgraded, Or Get Lost" href="http://www.mattiasgeniar.be/webdevelopment/get-upgraded-or-get-lost-for-ie6-support/" onclick="pageTracker._trackPageview('/outgoing/www.mattiasgeniar.be/webdevelopment/get-upgraded-or-get-lost-for-ie6-support/?referer=');">don&#8217;t make the necessary upgrades</a> to take advantage of this?</p>
<p>In the never-ending browser-wars, this is just about <strong>the most frustrating thing</strong> &#8211; gettings things to work in all versions of the software &#8211; even if it is over 8 years old and totally outdated (IE5). Why should we keep investing in learning new techniques, fancy new technologies and the likes when it won&#8217;t work on nearly 10% of all users?</p>
<p>*Le Sigh*</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/09/18/if-it-aint-broken-dont-fix-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory Leak In Google Analytics &#8211; Blame Canada?</title>
		<link>http://mattiasgeniar.be/2008/09/10/memory-leak-in-google-analytics/</link>
		<comments>http://mattiasgeniar.be/2008/09/10/memory-leak-in-google-analytics/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:00:32 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=655</guid>
		<description><![CDATA[Here&#8217;s an interesting post by Josh Breckman, titled &#8220;Google, you should know better. I fixed your memory leak for you.&#8220;. As it turns out, the Google Analytics code will create a new object of their analytics model on every page &#8230; <a href="http://mattiasgeniar.be/2008/09/10/memory-leak-in-google-analytics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting post by Josh Breckman, titled &#8220;<a href="http://breckman.com/entry.php?id=30" onclick="pageTracker._trackPageview('/outgoing/breckman.com/entry.php?id=30&amp;referer=');">Google, you should know better. I fixed your memory leak for you.</a>&#8220;. As it turns out, the Google Analytics code will create a new object of their analytics model on every page load of a site that uses the analytics software.</p>
<p>That object is used to collect user statistics, and show those nice graphs in your Google Analytics reports. But here&#8217;s the issue; the object is created on every pageload, <strong>but it&#8217;s never cleaned up properly</strong>. This means, that if you open up 1 000 sites that have Google Analytisc, that object will have been created a 1 000 times.</p>
<p>This appears to be the part of the code where it all goes wrong, at the <strong>A.onload</strong> bit.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span> <span style="color: #339933;">==</span> z <span style="color: #339933;">||</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">==</span> z<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> A <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    A.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> h.<span style="color: #660066;">Da</span> <span style="color: #339933;">+</span> l<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">==</span> z <span style="color: #339933;">?</span>
    <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">:</span> x <span style="color: #339933;">||</span>
    <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    A.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> p
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It can be solved by extending the code, to include the following extra.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span> <span style="color: #339933;">==</span> z <span style="color: #339933;">||</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">==</span> z<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> A <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    A.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> h.<span style="color: #660066;">Da</span> <span style="color: #339933;">+</span> l<span style="color: #339933;">;</span>
    A.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#123;</span> 
            A.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>z <span style="color: #339933;">!=</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>x <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
                x<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>All credits go to <a href="http://breckman.com/" title="Josh Breckman" onclick="pageTracker._trackPageview('/outgoing/breckman.com/?referer=');">Josh Breckman</a> for this discovery &#8211; it&#8217;s a very interesting find.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/09/10/memory-leak-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easiest Way To Create A MySQL Database Copy</title>
		<link>http://mattiasgeniar.be/2008/09/03/easiest-way-to-create-a-mysql-database-copy/</link>
		<comments>http://mattiasgeniar.be/2008/09/03/easiest-way-to-create-a-mysql-database-copy/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 19:31:14 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=435</guid>
		<description><![CDATA[Here&#8217;s just about the easiest way of copying a MySQL database from one server to another, or from one database to another &#8211; through the command line. This is the favored way when your database exceeds a certain size, because &#8230; <a href="http://mattiasgeniar.be/2008/09/03/easiest-way-to-create-a-mysql-database-copy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s just about the easiest way of copying a MySQL database from one server to another, or from one database to another &#8211; through the command line. This is the favored way when your database exceeds a certain size, because scripts such as PHPMyAdmin fail to import sql-dumps that are too large.<span id="more-435"></span></p>
<p>Log in on your server, and create a new folder to store our MySQL dump.</p>
<blockquote><p>[root@vps ~]# mkdir mysql-dump<br />
[root@vps ~]# cd mysql-dump/<br />
[root@vps mysql-dump]#</p></blockquote>
<p>Start the MySQL Dump.</p>
<blockquote><p>[root@vps mysql-dump]# mysqldump -u site_db_user -B site_db -p &gt; database_dump.sql<br />
Enter password:</p></blockquote>
<p>Quick explanation:</p>
<ul>
<li><strong>-</strong><strong>u &lt;username&gt;</strong>: define the user to log into MySQL and perform the back-up. This user needs the correct priviliges.</li>
<li><strong>-B &lt;database name&gt;</strong>: the &#8220;-B&#8221; adds the &#8220;CREATE DATABASE&#8221; statement to our dump, so we don&#8217;t have to create it first on the other server</li>
<li><strong>-p</strong>: this allows us to enter our password. You can also append it straight after the &#8220;-p&#8221; (such as: &#8220;-pMYPASS&#8221;), but this makes your password visible in the history, and to whoever is standing behind you. Just &#8220;-p&#8221; allows you to enter the password discretely.</li>
<li><strong>&gt; database_dump.sql</strong>: store the output of the MySQL Dump to a file called &#8220;database_dump.sql&#8221;.</li>
</ul>
<p>Copy the file to your other server (move it to a FTP-directory and download it, place it in a public folder and browse to it, &#8230;) and navigate to the folder.</p>
<blockquote><p>[root@vps mysql-dump]# mysql -h localhost -u new_site_db_user -p &lt; database_dump.sql<br />
Enter password:</p></blockquote>
<p>Again, a quickie:</p>
<ul>
<li><strong>-h</strong>: define the host to which you want to connect, by default this is &#8220;localhost&#8221;, but you could use it to connect directly to a MySQL server on another server &#8211; just enter the correct hostname/ip.</li>
<li><strong>-u &lt;username&gt;</strong>: the username used to log in to MySQL and create the database. User needs correct priviliges.</li>
<li><strong>-p</strong>: same as above, enter a password for the database-user</li>
<li><strong>&lt; database_dump.sql</strong>: import the contents of database_dump.sql (which we just created) to MySQL &#8211; any statement in that file will be executed (CREATE DB&#8217;s, INSERT&#8217;s, &#8230;)</li>
</ul>
<p>Could also be combined to the following:</p>
<blockquote><p>mysqldump -u site_db_user -B site_db | mysql -h localhost -u new_site_db_user -p</p></blockquote>
<p>This will send the output of the MySQL Dump directly to a new MySQL connection &#8211; without storing it in a local file first.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/09/03/easiest-way-to-create-a-mysql-database-copy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Bling-Bling Time &#8211; Let&#8217;s Talk Chrome</title>
		<link>http://mattiasgeniar.be/2008/09/02/its-bling-bling-time-lets-talk-chrome/</link>
		<comments>http://mattiasgeniar.be/2008/09/02/its-bling-bling-time-lets-talk-chrome/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 21:48:42 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=609</guid>
		<description><![CDATA[This&#8217;ll probably remain the hype of the month, so let&#8217;s discuss Google&#8217;s browser in short: Chrome (here&#8217;s a fun comic book explanation of how chrome works). Some things to note, right of the start. Install works flawlessly Bookmarks &#38; Saved &#8230; <a href="http://mattiasgeniar.be/2008/09/02/its-bling-bling-time-lets-talk-chrome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This&#8217;ll probably remain the <em>hype</em> of the month, so let&#8217;s discuss Google&#8217;s browser <strong>in short</strong>: <a href="http://www.google.com/chrome?open" onclick="pageTracker._trackPageview('/outgoing/www.google.com/chrome?open&amp;referer=');">Chrome </a>(here&#8217;s a fun comic book explanation of <a href="http://www.google.com/googlebooks/chrome/" onclick="pageTracker._trackPageview('/outgoing/www.google.com/googlebooks/chrome/?referer=');">how chrome works</a>).</p>
<p>Some things to note, right of the start.</p>
<ul>
<li>Install works flawlessly</li>
<li>Bookmarks &amp; Saved passwords are imported from Firefox &amp; are shown in the exact same way as you arranged them in Firefox, from the ones you dragged to your bookmark-toolbar, to the ones that remained in the bookmark-toolmenu.</li>
<li>It&#8217;s fast. Seriously, it&#8217;s very fast. If you double-click the icon, the browser has started 0.5 seconds later. That beats Firefox&#8217; time of 3s easily.</li>
<li>Page rendering; again, fast. And remarkebly faster than IE or Firefox.</li>
<li>Searching: you&#8217;re not limited to just Google search (as some critics may have suggested). In fact, when first starting the browser you&#8217;re asked if you want to use Google as your default search-engine, or another search-engine.</li>
</ul>
<p>It&#8217;s a very solid browser for a <em>beta</em> product, then again: Gmail is a very solid mail-solution for a beta. The interface is clean, works intuitive, adapts easily and is lightning fast.</p>
<p>Also good to note is that it uses nearly exactly the same shortcuts as firefox &#8211; so at this point I&#8217;d like to describe it as a &#8220;Firefox clone, but 6x faster&#8221;. In fact, it&#8217;s only using 40MB of RAM at this point, with 4 tabs open. Where Firefox is at 77MB, with the same tabs (granted; it has some extensions installed). I wonder what it&#8217;ll do in the long run, firefox had the nasty habbit of climbing up to 150MB of RAM when used for several hours.</p>
<p>Speaking of which &#8230; I wonder how long it&#8217;ll take before the good firefox extensions (WebDeveloper, Browser Agent Switcher, AdBlock, &#8230;) are ported to Chrome &#8211; after all, it is open source &#8230;</p>
<p>The extension missed most is definitely <strong>AdBlock</strong>. Would Google ever allow it? It sort of cuts in on their own business model, of selling advertising space.</p>
<p><strong>*Edit;</strong> it seems WordPress has its issues with Chrome; normal paragraphs aren&#8217;t inserted when typing a new article and hitting &#8220;enter&#8221;. In fact, it&#8217;s converted to &lt; divs&gt; instead of &lt; p&gt;&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/09/02/its-bling-bling-time-lets-talk-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;urchinTracker is not defined&#8221; Google Analytics Error</title>
		<link>http://mattiasgeniar.be/2008/08/25/urchintracker-is-not-defined-google-analytics-error/</link>
		<comments>http://mattiasgeniar.be/2008/08/25/urchintracker-is-not-defined-google-analytics-error/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 18:21:36 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[urchinTracker]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=490</guid>
		<description><![CDATA[It seems the new and improved tracking code from Google Analytics isn&#8217;t the only one having some issues with AdBlockers; the normal &#8220;Legacy Tracking Code&#8221; shares a similar problem. It occurs when your AdBlocker prevents an external javascript file from &#8230; <a href="http://mattiasgeniar.be/2008/08/25/urchintracker-is-not-defined-google-analytics-error/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It seems the new and improved tracking code from Google Analytics <a href="http://www.mattiasgeniar.be/webdevelopment/_gat-is-not-defined-google-analytics-error/" title="'_gat is not defined' Google Analytics Error" onclick="pageTracker._trackPageview('/outgoing/www.mattiasgeniar.be/webdevelopment/_gat-is-not-defined-google-analytics-error/?referer=');">isn&#8217;t the only one having some issues with AdBlockers</a>; the normal &#8220;<strong>Legacy Tracking Code</strong>&#8221; shares a similar problem.</p>
<p>It occurs when your AdBlocker prevents an external javascript file from being loaded (<a href="http://www.google-analytics.com/urchin.js" onclick="pageTracker._trackPageview('/outgoing/www.google-analytics.com/urchin.js?referer=');">urchin.js</a>) from google-analytics.com, or when the site just not available. This will present your users with a nasty javascript error you don&#8217;t want.</p>
<p>Here&#8217;s the solution, modify your javascript so it includes a check to <strong>see if the function exists, before calling it</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
_uacct <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;UA-CODE&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>urchinTracker<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'function'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  urchinTracker<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>There&#8217;s also a <a href="http://www.giantrobot.co.nz/node/72" onclick="pageTracker._trackPageview('/outgoing/www.giantrobot.co.nz/node/72?referer=');">fixed urchin.js</a> file you can use, instead of linking to Google-Analytics.com to download the file. More information can be found on <a href="http://www.giantrobot.co.nz/node/72" onclick="pageTracker._trackPageview('/outgoing/www.giantrobot.co.nz/node/72?referer=');">The Giant Robot</a> blog.</p>
<p>You could also change the URL for the file, in case the HTTP-site is down, to <strong>include the file from a HTTPs</strong> website: <a href="https://ssl.google-analytics.com/urchin.js" onclick="pageTracker._trackPageview('/outgoing/ssl.google-analytics.com/urchin.js?referer=');">https://ssl.google-analytics.com/urchin.js</a>. In fact, you should consider including the HTTPs version all the time when you run a website over HTTPs. This will present some false-positive warning messages, where the user will be alarmed that content from an <strong>unsafe website</strong> is being loaded (google-analytics.com, over HTTP). Change it to the HTTPs file-location, and that solves it too.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/08/25/urchintracker-is-not-defined-google-analytics-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;_gat is not defined&#8221; Google Analytics Error</title>
		<link>http://mattiasgeniar.be/2008/08/25/_gat-is-not-defined-google-analytics-error/</link>
		<comments>http://mattiasgeniar.be/2008/08/25/_gat-is-not-defined-google-analytics-error/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 17:51:18 +0000</pubDate>
		<dc:creator>Matti</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[_gat]]></category>

		<guid isPermaLink="false">http://www.mattiasgeniar.be/?p=481</guid>
		<description><![CDATA[A common problem with Google Analytics is the &#8220;_gat is not defined&#8221; javascript error, when you try to load a webpage that uses Google Analytics to track visitors behavior. This happens because the visitor most likely has an AdBlocker installed &#8230; <a href="http://mattiasgeniar.be/2008/08/25/_gat-is-not-defined-google-analytics-error/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A common problem with Google Analytics is the &#8220;<strong>_gat is not defined</strong>&#8221; javascript error, when you try to load a webpage that uses Google Analytics to track visitors behavior.</p>
<p>This happens because the visitor most likely has an AdBlocker installed (such as AdBlock Plus for Firefox), which filters out a javascript file from Google. The code then tries to create an instance of an object it doesn&#8217;t know (because the definitions are missing, since the file isn&#8217;t included) and it throws the &#8220;<strong>_gat is not defined</strong>&#8221; error.</p>
<p>We wouldn&#8217;t be showing the problem, if there weren&#8217;t <strong>a solution</strong> of course. Just change your code to the following, which will check if the object actually exists before trying to create an instance of that object. The tracker won&#8217;t fully work (but it didn&#8217;t in the first place anyway), but at least the user won&#8217;t be shown the nasty javascript error.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>_gat<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'object'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> pageTracker <span style="color: #339933;">=</span> _gat._getTracker<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;UA-CODE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	pageTracker._trackPageview<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>This only happens if you try to use the New Tracking Code (ga.js) (the new, and &#8220;<strong>improved</strong>&#8221; version) over the old Legacy Tracking Code (urchin.js). The bug&#8217;s been around for a while, it&#8217;s strange Google hasn&#8217;t provided a clear fix for this yet &#8230;</p>
<p><strong>Update:</strong> new Analytics code doesn&#8217;t have this problem anymore. If you edit your Site-details in Google Analytics, and view your Google Analytics code, you&#8217;ll see something similar to this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> gaJsHost <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;https:&quot;</span> <span style="color: #339933;">==</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">protocol</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;https://ssl.&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>unescape<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;%3Cscript src='&quot;</span> <span style="color: #339933;">+</span> gaJsHost <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> pageTracker <span style="color: #339933;">=</span> _gat._getTracker<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;UA-MYCODE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
pageTracker._trackPageview<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Error handling has prevented the error message to be shown. It is advised to use the code that Google provides, instead of the &#8220;hack&#8221; shown on top of this page. </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgeniar.be/2008/08/25/_gat-is-not-defined-google-analytics-error/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
