<?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>dominykas.com</title>
	<atom:link href="http://www.dominykas.com/index.rss2.xml" rel="self" type="application/rss+xml" />
	<link>http://www.dominykas.com</link>
	<description>I&#039;d like to someday write a book about asking the right questions</description>
	<lastBuildDate>Sun, 16 May 2010 22:42:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>(Solved) troubles with Ubuntu, VirtualBox, OpenVZ/Proxmox and MySQL</title>
		<link>http://www.dominykas.com/2010/05/solved-troubles-with-ubuntu-virtualbox-openvzproxmox-and-mysql.html</link>
		<comments>http://www.dominykas.com/2010/05/solved-troubles-with-ubuntu-virtualbox-openvzproxmox-and-mysql.html#comments</comments>
		<pubDate>Sun, 16 May 2010 22:42:46 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Geeky stuff]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[proxmox]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=108</guid>
		<description><![CDATA[Positive start: my new Dell XPS 8100 is now ready for work. To achieve that I had to overcome a couple of puzzlers. They were mostly related to my weird requirements, which I guess are not the common set up path&#8230;
The weird setup

The choice of desktop OS is sort of trivial &#8211; Ubuntu 10.04 Lucid [...]]]></description>
			<content:encoded><![CDATA[<p>Positive start: my new Dell XPS 8100 is now ready for work. To achieve that I had to overcome a couple of puzzlers. They were mostly related to my weird requirements, which I guess are not the common set up path&#8230;</p>
<h2>The weird setup</h2>
<ul>
<li>The choice of desktop OS is sort of trivial &#8211; Ubuntu 10.04 Lucid Lynx. The reasoning is simple &#8211; 99% of things just work and I&#8217;m quite familiar with it. The active community plays a large part too.</li>
<li><a href="http://www.virtualbox.org/">VirtualBox</a> as the main virtualizer. I&#8217;m already a bit familiar with it, and I like its small footprint and the fact that it is easy to setup. I also made a stupid mistake of activating my Windows 7 inside of it, before trying out other VM software. At the end of the day &#8211; with guest additions installed, it is absolutely amazing and I have no problems there. Seriously &#8211; <a href="http://twitter.com/dymonaz/status/13877378744">I can watch YouTube inside Win7 inside a VM</a> practically without glitches!</li>
<li><a href="http://pve.proxmox.com/wiki/Main_Page">Proxmox Virtual Environment</a> inside the aforementioned Virtualbox. Now, some might say I&#8217;m crazy to run a VM inside a VM, but using <a href="http://pve.proxmox.com/wiki/Container_and_Full_Virtualization">containers is far more efficient</a> (especially due to low RAM usage) than running real VMs. Considering OpenVZ was not included in Lucid, and LXC is by far not ready (read: I don&#8217;t have enough time to learn everything without proper documentation), Proxmox was an easy choice to make. I&#8217;m already using it in production and I&#8217;m really happy with how easy it is to setup and maintain.</li>
<li>Ubuntu Lucid again, to host services (Apache, MySQL, couchdb, etc) inside OpenVZ containers. I absolutely love the <a href="http://wiki.openvz.org/Download/template/precreated">minimal OpenVZ templates</a>. The only reason I&#8217;m not going for Debian here is the fact that the releases don&#8217;t happen frequently enough for my liking. I may reconsider this down the road &#8211; but for now &#8211; Ubuntu works out for me better.</li>
</ul>
<h2>Problem 1. Proxmox didn&#8217;t like being inside VirtualBox</h2>
<p>I downloaded the &#8220;bare metal installer&#8221; and tried to start it in a VM. All went well until the first reboot, and then it would just hang after detecting the (virtual) hard disks. Took me a couple of hours of scratching my head, until I installed pure Debian inside VirtualBox. Strangely, during installation, the hard drive was appearing as <code>hda</code>, but after finishing, would all of a sudden change to <code>sda</code>, which obviously made things go really sour.</p>
<p><strong>Solution:</strong> change the IDE controller (VM properties -&gt; Storage) from the default PIIX4 to ICH6. I have no clue what all of this means, but the resulting VM now boots fine.</p>
<h2>Problem 2. <code>fsck</code> during every boot due to &#8220;last mount time in the future&#8221;</h2>
<p>This one is simple &#8211; the VM has no access to the hardware clock, which by default is expected to be set to UTC, so your true time gets double-adjusted (once in the host, once in the guest). To fix edit <code>/etc/default/rcS</code> and <a href="http://forums.virtualbox.org/viewtopic.php?f=3&#038;t=27334">make sure <code>UTC=no</code></a>.</p>
<h2>Problem 3. MySQL won&#8217;t start inside Lucid inside OpenVZ</h2>
<p>Considering that Lucid doesn&#8217;t really support being the host, or the guest of OpenVZ, this comes as no surprise and the bug is marked as &#8220;<a href="https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.1/+bug/566736">Won&#8217;t fix</a>&#8220;. Luckily, there&#8217;s a smart guy, <a href="http://blog.bodhizazen.net/linux/ubuntu-10-04-openvz-templates/">who has a workaround</a>. Solution: edit <code>/etc/init/mysql.conf</code> to have it <code>start on runlevel [2345]</code>, instead of the default method, which depends on networking.</p>
<p>I think, I now have all the ingredients to start working on the <em>???</em> part!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2010/05/solved-troubles-with-ubuntu-virtualbox-openvzproxmox-and-mysql.rss2.xml</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just how much does performance matter?</title>
		<link>http://www.dominykas.com/2010/04/just-how-much-does-performance-matter.html</link>
		<comments>http://www.dominykas.com/2010/04/just-how-much-does-performance-matter.html#comments</comments>
		<pubDate>Wed, 07 Apr 2010 20:40:57 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Webbie stuff]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=82</guid>
		<description><![CDATA[I have recently moved my dedicated server to a new provider. I mostly did this for pricing reasons, but there&#8217;s also the benefit of network speed, as most of my visitors and now &#8211; the server itself &#8211; are in Europe. This move, coupled with a few optimizations, has opened my eyes towards some data [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently moved my dedicated server to a new provider. I mostly did this for pricing reasons, but there&#8217;s also the benefit of network speed, as most of my visitors and now &#8211; the server itself &#8211; are in Europe. This move, coupled with a few optimizations, has opened my eyes towards some data &#8211; the impact of page load time on &#8220;pages per visit&#8221; metric. While the general theory behind the relationship of the two is clear to everyone, the actual numbers did shock me.</p>
<p>There is a small community that I am hosting &#8211; it has roughly 2000 members, who are pretty active. As the community does not accept any new members, the results reflect just the <strong>engagement based on page load speed</strong>. I did not really take measurements, and <a href="http://www.google.com/webmasters/">Webmaster Central</a> page speed lab tool is unable to provide the numbers due to the closed nature of the community, I estimate that the average full page <strong>load time decreased from some 8-12s to 3-5s</strong>. The effect on <strong>pageviews? PLUS THIRTY FIVE PERCENT</strong>. There is no change in the number of visits (sessions), but the number of pageviews is up by a third <strong>instantly</strong>. Check out the graph:</p>
<p style="text-align:center;"><a href="http://www.dominykas.com/uploads/2010/04/page-speed-improves-ppv.png"><img src="http://www.dominykas.com/uploads/2010/04/page-speed-improves-ppv-300x72.png" alt="" title="page-speed-improves-ppv" width="300" height="72" class="aligncenter size-medium wp-image-83"/></a></p>
<p>There is one more statistically significant website that I had a chance to test. This time, the page load time decreased from 5s to 1.5s. Yet again &#8211; the pages per visit number is up by 12%. Now, here&#8217;s the best part of it all &#8211; the two websites are somewhat related (you may call them &#8220;affiliates&#8221; if you&#8217;d like). Since both of them had substantial speed improvements &#8211; the referral rate from one to the other has actually increased&#8230; <strong>threefold</strong>.</p>
<p>While I must say, that the actual time on site has not increased as much, the pageview count is what matters a lot if you&#8217;re participating in <abbr title="Pay per click">PPC</abbr>. Funny thing, is that if you <em>are</em> actually participating in <a href="http://www.stevesouders.com/blog/2010/03/29/p3pc-google-adsense/">Google AdSense &#8211; that will be the bottleneck</a>.</p>
<p>At the end of the day &#8211; the overall user experience improvement is quite immeasurable and the pleasure of having your visitors tell you &#8220;wow this is fast&#8221; is indescribable.</p>
<p>Worried about premature optimization? Well, it still holds true that you should only optimize where it hurts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2010/04/just-how-much-does-performance-matter.rss2.xml</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmark: HTML outlining/TOC scripts</title>
		<link>http://www.dominykas.com/2010/01/benchmark-html-outlining-toc-scripts.html</link>
		<comments>http://www.dominykas.com/2010/01/benchmark-html-outlining-toc-scripts.html#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:09:12 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Webbie stuff]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=68</guid>
		<description><![CDATA[A bit over a week ago Chris Heilmann published a post on table of contents generators, where he listed a couple of JavaScript methods to do that. It&#8217;s been always in the plans to optimize the performance of my own implementation of the HTML5 outlining routine &#8211; and what better way to measure it, than [...]]]></description>
			<content:encoded><![CDATA[<p>A bit over a week ago <a href="http://www.wait-till-i.com/2010/01/06/the-table-of-contents-script-my-old-nemesis/">Chris Heilmann published a post on table of contents generators</a>, where he listed a couple of JavaScript methods to do that. It&#8217;s been always in the plans to optimize the performance of <a href="http://code.google.com/p/h5o/">my own implementation of the HTML5 outlining routine</a> &#8211; and what better way to measure it, than to compare it with some other approaches while I&#8217;m at it. To no surprise, I lost. Big time.</p>
<h2>Results</h2>
<ol>
<li>Chris Heilmann&#8217;s <a href="http://isithackday.com/demos/tocit/toc_yui3.html">YUI based approach</a> (136ms)</li>
<li>Chris Heilmann&#8217;s <a href="http://isithackday.com/demos/tocit/toc_dom.html">DOM based approach</a> (247ms)</li>
<li>Stuart Langridge&#8217;s <a href="http://www.kryogenix.org/code/browser/generated-toc/">generated-toc</a> (258ms)</li>
<li><a href="http://github.com/joshwnj/toc">Josh Johnston&#8217;s solution</a> with jQuery (781ms)</li>
<li>My own <a href="http://code.google.com/p/h5o/">HTML5 Outliner</a> (3099ms)</li>
<li>Chris Heilmann&#8217;s <a href="http://isithackday.com/demos/tocit/toc_js.html">RegExp based approach</a> (4440ms)</li>
<li><a href="http://lab.diogovincenzi.com/blog/view/table-contents-jquery">Diogo Vincenzi&#8217;s solution</a> with jQuery (9334ms)</li>
</ol>
<h3>Methodology</h3>
<p>The numbers above are based on an 1.5Mb file, which has some 200 headings to use for the TOC table. The actual file, was created out of HTML4 specification part on forms, to reflect a more natural usage. The results were a bit different, when I used my own generated file, which had a lot more headings, and a lot less text.</p>
<p>The test runner itself would create an <code>iframe</code>, load the test document inside, inject the required script and call it. The <a href="http://code.google.com/p/h5o/source/browse/trunk/benchmark">source is available</a> on Google Code (though be aware, that you will need to procure and hack the dependencies yourself).</p>
<p>I ran it on a decent 2.2Ghz laptop, using a vanilla version of Portable Firefox 3.5. With some exceptions (see below), the results were comparable and not unexpected in other browsers.</p>
<h2>Insights</h2>
<ul>
<li>The RegExp based approach was a non-contender from the start, as it doesn&#8217;t really work under any browser, other than Firefox.</li>
<li>Diogio&#8217;s solution scored so low because it&#8217;s querying the DOM twice inside every loop iteration (I think).</li>
<li>I am impressed at how well YUI3 performed &#8211; on every browser (incl. IE8), except Opera. I seriously need to follow up on the Opera thing&#8230;</li>
<li>Speaking of YUI3 &#8211; one needs to go through extra hoops to measure performance, due to YUI loader&#8217;s <code>setTimeout()</code>. And make sure that you have all dependencies in on file, to avoid calls to the Yahoo&#8217;s CDN.</li>
<li>IE8 didn&#8217;t like 2Mb documents inside an <code>iframe</code> (hence 1.5Mb)</li>
<li>I have plenty of space for improvement &#8211; it will be fun!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2010/01/benchmark-html-outlining-toc-scripts.rss2.xml</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC generates invalid ClientIDs</title>
		<link>http://www.dominykas.com/2009/12/asp-net-mvc-generates-invalid-clientids.html</link>
		<comments>http://www.dominykas.com/2009/12/asp-net-mvc-generates-invalid-clientids.html#comments</comments>
		<pubDate>Sat, 19 Dec 2009 16:03:05 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Webbie stuff]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=40</guid>
		<description><![CDATA[This week I had a joy of spending several hours trying to solve and intermitently happening bug. In short, some 2 times out of 3 the YUI selector utility failed to lookup elements in an XHR loaded HTML fragment. After digging quite deep into the YUI code, I found that it was actually the fault [...]]]></description>
			<content:encoded><![CDATA[<p>This week I had a joy of spending several hours trying to solve and intermitently happening bug. In short, some 2 times out of 3 the <a href="http://developer.yahoo.com/yui/selector/">YUI selector</a> utility failed to lookup elements in an XHR loaded HTML fragment. After digging quite deep into the YUI code, I found that it was actually the fault of the way <a href="http://www.asp.net/mvc/">ASP.NET MVC</a> treats partial views. </p>
<h2>Summary</h2>
<ul>
<li>ASP.NET MVC allows use of ASCX as &#8220;partial views&#8221;</li>
<li>It correctly assumes, that uniqueness of ClientID should be preserved</li>
<li>It incorrectly does not prepend an alpha-character to automatically generated GUID based IDs</li>
<li>User agents and selector libraries may correctly ignore such invalid IDs</li>
<li><a href="http://www.dominykas.com/2009/12/asp-net-mvc-generates-invalid-clientids.html#solution-20091219">Solution: override <code>ViewUserControl.UniqueID</code></a></li>
</ul>
<h2>The problem with ASP.NET MVC</h2>
<p>ASP.NET MVC allows you to return an ASCX control as a view. This allows using a very nice pattern, of loading only parts of the page using XHR, while still being able to use the same controls when the full page is generated.</p>
<p>If you&#8217;ve used ASP.NET enough, then <code>ctl00_something_something</code> must be familliar &#8211; it&#8217;s an automatically generated value for HTML <code>id</code> attributes. ASP.NET does a pretty good job in ensuring that the requirement of unique IDs is followed, however, that only really works for fully generated pages.</p>
<p>If you are returning a partial view to be injected into some page, the context has already been lost &#8211; i.e. the server no longer knows anything about the original counter of controls and unique IDs. To circumvent this problem, MVC uses a GUID as a prefix for the ClientID generation. While, this is an absolutely correct approach, which basically means that ID collision is practically impossible, when you inject your partials into the DOM, the actual implementation has a small bug &#8211; the <a href="http://www.w3.org/TR/html401/types.html#type-name">HTML spec says</a>:</p>
<blockquote><p>ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (&#8220;-&#8221;), underscores (&#8220;_&#8221;), colons (&#8220;:&#8221;), and periods (&#8220;.&#8221;).</p>
</blockquote>
<p>However, as we all know, the GUIDs <em>may</em> start with a number. In fact, they <em>do</em> start with a number much more often than they do with a letter. Which means that your partial views start having situations where <code>id="<strong style="text-decoration:underline;">1</strong>1fa1658-d453-42e0-86f1-e640c476f7ac_ctl02_something_something"</code>. Naturally, if your client side framework is standards aware, it may ignore the <code>id</code> attribute altogether and fail miserably.</p>
<h2>The YUI (non)part of the problem</h2>
<p>In general, the advice is to not use ID attributes as a base for your operations &#8211; be it selecting elements, or attaching events (use classes and wiser selectors instead). In our case, though, we still have a lot of legacy code, which does not follow this approach. There is also the case of Visual Studio sometimes inserting IDs automatically. Still, it doesn&#8217;t matter how IDs end up there &#8211; if you&#8217;re using YUI selector library, you will get some autogenerated IDs anyways.</p>
<p>The reasoning for that, is that querying the DOM using IDs is very cheap with <code>getElementById()</code>. If you&#8217;re supplying a parent element, from which your query should be run, YUI will either re-use the ID that already exists, or will create a new (unique) one for the purposes of expanding your query, i.e. <code>YAHOO.util.Selector.query(".myClass", parentElement)</code> will become <code>"DIV#<i>parentId</i> .myClass"</code> which in turn will be expanded into <code>"DIV[id=<i>parentId</i>] [class=myClass]"</code>, which is still the very same selector, but is easier to parse and process.</p>
<p>Now, the only problem is the regex (<code>'\\#(-?[_a-z]+[-\\w]*)': '[id=$1]'</code>) which does the expanding of ID and class selectors into the attribute based selectors &#8211; it does follow the standard, and only accepts valid values, which means that if your ID starts with a number &#8211; it will not be expanded and the whole query will fail.</p>
<h2 id="solution-20091219">Solution</h2>
<p>While some may say, that YUI should be updated to be more lenient on such errors, I say that there should be no place on the web for invalid code. And there&#8217;s also a much simpler solution to the problem &#8211; override default behaviour of <code>ViewUserControl.UniqueID</code>:</p>
<pre>public class MyViewUserControl : ViewUserControl
{
	public override string UniqueID
	{
		get
		{
			var retval = base.UniqueID;
			if(!string.IsNullOrEmpty(retval)
				&#038;&#038; char.IsDigit(retval[0]))
			{
				retval = "c" + retval;
			}
			return retval;
		}
	}
}
</pre>
<p>Now&#8230; where do I report bugs in ASP.NET MVC?..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2009/12/asp-net-mvc-generates-invalid-clientids.rss2.xml</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascript:void(0) must die</title>
		<link>http://www.dominykas.com/2009/12/javascript-void-must-die.html</link>
		<comments>http://www.dominykas.com/2009/12/javascript-void-must-die.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 23:32:31 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Webbie stuff]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=8</guid>
		<description><![CDATA[Pretty much two weeks ago I dropped my notes from FullFrontal 2009 onto developer&#8217;s forum at work. And one full colleague of mine enquired why did I say that &#8220;javascript:void(0) must die&#8221;. I didn&#8217;t really have a chance to follow it up until now (happy birthday, dear blog).
It doesn&#8217;t do anything, it just sits there!
Now, [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty much two weeks ago I dropped my notes from <a href="http://2009.full-frontal.org/">FullFrontal 2009</a> onto developer&#8217;s forum at work. And one full colleague of mine enquired why did I say that &#8220;<code>javascript:void(0)</code> must die&#8221;. I didn&#8217;t really have a chance to follow it up until now (happy birthday, dear blog).</p>
<h2>It doesn&#8217;t do anything, <a title="Video: Electric Six - Broken Machine" href="http://www.youtube.com/watch?v=pjq3vQV6v-Y">it just sits there</a>!</h2>
<p>Now, normally I&#8217;m not a complete standards freak (unlike the guys working on <a href="http://code.google.com/p/google-caja/">Caja</a>). But what does <code>&lt;a href="javascript:void(0)"&gt;</code> really mean? The answer is simple &#8211; <strong>nothing</strong>.</p>
<p>First of, it&#8217;s a hyperlink to a resource, which should be accessed over Javascript &#8220;protocol&#8221;. Here&#8217;s the problem &#8211; I don&#8217;t really feel that &#8220;javascript&#8221; is a protocol. And it can&#8217;t really handle resources. But lets ignore that. What is the actual resource?</p>
<p>The link tells &#8220;use javascript&#8221; to &#8220;retrieve&#8221;&#8230; <strong>void</strong>. Why would anyone in the world want to view void in their browser? If anyone ever wants to look at it &#8211; they&#8217;re much better off achieving that goal on YouTube&#8230;</p>
<h2>Semantics apart &#8211; it&#8217;s not comprehensible</h2>
<p>Lets suppose, you don&#8217;t really care about web standards and semantics. I&#8217;d probably agree with you &#8211; we&#8217;re quite far away from having a meaningful web (if ever). Still, having crap as the URL is no good &#8211; apparently, <strong>screen readers will read that URL</strong> out loud.</p>
<p>Can you imagine anyone discussing this over a pint: &#8220;You know, I found this great site at <i>javascript colon void opening parenthesis zero closing parenthesis</i>&#8220;? That kind of URL would not make any sense to regular folks.</p>
<h2>Accessibility is NOT about screen readers, though</h2>
<p>Such a link kills browsing experience for sighted users too. Have you ever tried what happens when you <strong>middle-click the void link</strong>? Or right-click and then select &#8220;Open in new tab&#8221;? Here &#8211; <a href="javascript:void(0)" onclick="alert('Firefox and Opera open a background tab, Chrome and IE8 execute onclick JS upon middle click');">try it out</a> (mileage may vary if you use a recent browser).</p>
<p>Exactly &#8211; you guessed it &#8211; <strong>nothing</strong> meaningful happens. Just as it should!</p>
<h2>Solution 1: Use real URLs</h2>
<p>There are several ways out of this. My favorite one is to provide a real URL. If you&#8217;re following progressive enhancement methodology in your work, you always want to provide alternative links to achieve (near full) functionality even when Javascript is disabled.</p>
<p>This means, that instead of having a <code>&lt;a href="javascript:void(0)"&gt;Delete&lt;/a&gt;</code> and attaching <code>onclick</code> handler to it, popping out a confirm dialog and then making a background call using XHR, you provide a link to e.g. <code>/myResource?delete</code> which brings up a form, with a real <code>&lt;button&gt;</code>.</p>
<p>The actual backend code doesn&#8217;t become that much trickier &#8211; you don&#8217;t really have to write up a new &#8220;delete&#8221; routine. By using a confirmation interstitial, you also provide a way to confirm the action, and you can still use a POST request, as this action has permanent effect.</p>
<h2>Solution 2: don&#8217;t use anchor tag</h2>
<p>The above solution doesn&#8217;t always work &#8211; if you have a really interactive application, you&#8217;re not always able to provide links. However, since you&#8217;re already using JS &#8211; why use the <code>&lt;a&gt;</code> tag where it doesn&#8217;t belong?</p>
<p>I did hear some advice, to use <code>&lt;button&gt;</code> for clickable things, which are not really links. You should investigate that, but anyone who has tried to style buttons, knows that it can very easily become a major pain.</p>
<p>Still, you can attach your <code>onclick</code> handlers on anything you want &#8211; <code>div</code>, <code>span</code> and so on. In such cases, you should also add <code>tabindex</code> to make elements focusable and make use of ARIA roles to provide guidelines on behaviour. It&#8217;s not really that hard, now, is it?</p>
<p>The only really painful thing here is providing <code>:hover</code> and <code>:focus</code> styles on IE6. But IE6 should also die, together with <code>javascript:void(0)</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2009/12/javascript-void-must-die.rss2.xml</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.dominykas.com/2009/12/hello-world.html</link>
		<comments>http://www.dominykas.com/2009/12/hello-world.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 21:28:24 +0000</pubDate>
		<dc:creator>Dominykas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dominykas.com/?p=1</guid>
		<description><![CDATA[There is no long story. My blog in Lithuanian will have a second birthday in 5 days. Here&#8217;s my present to myself.

I write, you read and comment
???
PROFIT!

Oh, and yes, you&#8217;re right &#8211; now that I have a blog, I will not update it frequently.
]]></description>
			<content:encoded><![CDATA[<p>There is no long story. My <a href="http://www.d-b.lt/">blog in Lithuanian</a> will have a second birthday in 5 days. Here&#8217;s my present to myself.</p>
<ol>
<li>I write, you read and comment</li>
<li>???</li>
<li>PROFIT!</li>
</ol>
<p>Oh, and yes, you&#8217;re right &#8211; now that I have a blog, I will not update it frequently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dominykas.com/2009/12/hello-world.rss2.xml</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
