<?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>Life Scaling &#187; Browsers</title>
	<atom:link href="http://orensol.com/category/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://orensol.com</link>
	<description>Oren Solomianik's Blog</description>
	<lastBuildDate>Mon, 21 Jun 2010 08:10:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache mod_ssl Makes Your Clients Crawl Compared To Nginx SSL Module</title>
		<link>http://orensol.com/2009/07/27/apache-mod_ssl-makes-your-clients-crawl-compared-to-nginx-ssl-module/</link>
		<comments>http://orensol.com/2009/07/27/apache-mod_ssl-makes-your-clients-crawl-compared-to-nginx-ssl-module/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 07:39:26 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[TLS]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=264</guid>
		<description><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank">SSL/TLS</a> process is a heavy one, it involves algorithm negotiation between client and server, key exchanges, cyphering, decyphering and authentication. But what&#8217;s surprising is, that the server you&#8217;re connecting to can directly influence the performance of your client and its CPU consumption.</p>
<p>I had a php command line process spawning child processes and [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank">SSL/TLS</a> process is a heavy one, it involves algorithm negotiation between client and server, key exchanges, cyphering, decyphering and authentication. But what&#8217;s surprising is, that the server you&#8217;re connecting to can directly influence the performance of your client and its CPU consumption.</p>
<p>I had a php command line process spawning child processes and connecting through SSL to a web server, in 2 scenarios. The first scenario was to an out of the box <a href="http://httpd.apache.org/docs/2.2/ssl/" target="_blank">Apache httpd server with mod_ssl</a>, and the second scenario was to an out of the box <a href="http://wiki.nginx.org/NginxHttpSslModule" target="_blank">Nginx with the SSL module</a>. Both were using the exact same box, and were &#8220;out of the box&#8221; meaning I used the default configuration for both.</p>
<p>In the first scenario I was able to spawn no more than 6 (!) php processes before the box running them began to show load, and the CPU queue started to fill up. Each php child was taking between 15%-30% cpu at any given moment.</p>
<p>In the second scenario, I was able to spawn 40 (!!) php child processes without the box being loaded. Each php child was taking around 1.5% cpu.</p>
<p>I&#8217;m no SSL expert, and there might be a way to configure Apache to inflict less load on the connecting client. There is also <a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslsessioncache" target="_blank">SSLSessionCache</a> which might relieve load from both the server and the client. But the &#8220;out of the box&#8221; configuration shows that Nginx is a real winner again.</p>
<p>If you can, avoid SSL altogether. If not, terminate it at a front-end before proceeding to Apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/07/27/apache-mod_ssl-makes-your-clients-crawl-compared-to-nginx-ssl-module/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Chrome 2, CSS Content-Type and Amazon S3</title>
		<link>http://orensol.com/2009/07/14/google-chrome-2-css-content-type-and-amazon-s3/</link>
		<comments>http://orensol.com/2009/07/14/google-chrome-2-css-content-type-and-amazon-s3/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 11:30:15 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Content-Type]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=258</guid>
		<description><![CDATA[<p>It seems that ever since <a href="http://gizmodo.com/5265565/google-chrome-2-released-with-much-faster-rendering-full-screen" target="_blank">Google Chrome 2 was released</a>, some of the CSS files I was serving from S3 were not being treated as valid by it, and the page layouts would break because of it. Firefox and IE were fine with it, and Chrome 1 was ok with it too. It [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-260" src="http://orensol.com/files/2009/07/google-chrome-logo.jpg" alt="Google Chrome" width="278" height="198" />It seems that ever since <a href="http://gizmodo.com/5265565/google-chrome-2-released-with-much-faster-rendering-full-screen" target="_blank">Google Chrome 2 was released</a>, some of the CSS files I was serving from S3 were not being treated as valid by it, and the page layouts would break because of it. Firefox and IE were fine with it, and Chrome 1 was ok with it too. It was just Chrome 2.</p>
<p>A little inspection showed that the CSS files I stored on S3 were not being served with a Content-Type header, while from a standard apache web server they were. This combined with the new strictness of Chrome 2 (actually resulting from <a href="http://groups.google.com/group/chromium-discuss/browse_thread/thread/3dae053171a48104/0399d333ca51419b" target="_blank">a new strictness in WebKit</a>) made Chrome not treat these files as actual CSS, and break the page.</p>
<p>So the obvious solution was to make the CSS files be delivered from S3 with the correct &#8220;Content-Type: text/css&#8221; header. Fortunately enough, this is <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?RESTObjectPUT.html" target="_blank">very easy to do with S3 API</a>. Just pass the &#8220;Content-Type:text/css&#8221; header when you&#8217;re uploading the file to S3, and it will be present in the response headers whenever someone requests the file.</p>
<p>Here&#8217;s to the browser wars, that never end and got more complicated with the new player in town, Google Chrome.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/07/14/google-chrome-2-css-content-type-and-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Domain AJAX Calls and Iframe Communication How To</title>
		<link>http://orensol.com/2009/06/07/cross-domain-ajax-calls-and-iframe-communication-how-to/</link>
		<comments>http://orensol.com/2009/06/07/cross-domain-ajax-calls-and-iframe-communication-how-to/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 13:50:37 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[cross domain]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fragment]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[postMessage]]></category>
		<category><![CDATA[xd]]></category>
		<category><![CDATA[xd_receiver]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=238</guid>
		<description><![CDATA[<p>I set out to write a short tutorial about cross domain ajax calls and communication between iframes using url hashes (fragments), but I found this <a href="http://softwareas.com/cross-domain-communication-with-iframes" target="_blank">great tutorial by Michael Mahemoff</a> covering the subject inside and out.</p>
<p>It is important to note that the code on his demo uses window.location.hash, although it seems this practice [...]]]></description>
			<content:encoded><![CDATA[<p>I set out to write a short tutorial about cross domain ajax calls and communication between iframes using url hashes (fragments), but I found this <a href="http://softwareas.com/cross-domain-communication-with-iframes" target="_blank">great tutorial by Michael Mahemoff</a> covering the subject inside and out.</p>
<p>It is important to note that the code on his demo uses <code>window.location.hash</code>, although it seems this practice should currently be avoided because of a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=483304" target="_blank">known</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=378962" target="_blank">open</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=277456" target="_blank">bugs</a> in the way Firefox URI-decodes document.location.hash when getting its value (could be considered an expected behavior and not a bug, but still different than any other browser). <a href="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js" target="_blank">Facebook&#8217;s code</a> uses substring on <code>pathname</code>, and it seems to work cross browser. Facebook also have on their wiki a <a href="http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication" target="_blank">nice visual explanation</a> of how it works:</p>
<p><img src="http://wiki.developers.facebook.com/images/a/a7/Docs_xdcomm.png" alt="" width="495" height="447" /></p>
<p>Until the <a href="https://developer.mozilla.org/En/DOM:window.postMessage" target="_blank">HTML 5 postMessage</a> is widely adopted, we will have to keep using this somewhat of a hack, but it works, that&#8217;s what&#8217;s important.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/06/07/cross-domain-ajax-calls-and-iframe-communication-how-to/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex on Ubuntu: The Complete How To Guide</title>
		<link>http://orensol.com/2009/03/24/flex-on-ubuntu-the-complete-how-to-guide/</link>
		<comments>http://orensol.com/2009/03/24/flex-on-ubuntu-the-complete-how-to-guide/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 10:05:00 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=142</guid>
		<description><![CDATA[<p></p>
<p>I usually live with the axiom that whatever you can find in the realm of Windows and proprietary software, you can easily find in the realm of Linux (any flavor) and open source. While this is indeed usually the case, when it comes to a Flex IDE for Ubuntu, there&#8217;s a real gap. Adobe has [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-156" src="http://orensol.com/files/2009/03/ubuntu_flex.png" alt="ubuntu_flex" width="262" height="262" /></p>
<p>I usually live with the axiom that whatever you can find in the realm of Windows and proprietary software, you can easily find in the realm of Linux (any flavor) and open source. While this is indeed usually the case, when it comes to a Flex IDE for Ubuntu, there&#8217;s a real gap. Adobe has their Flash IDE for willing and paying Windows users, and I am happy to say that I was one of these happy customers a while ago. But since then, Ubuntu has taken over my life, and when I set out to make a small Flex app a couple of days ago, I came across some hurdles. Not impossible to overcome, but not trivial as well.</p>
<h3>The Options</h3>
<p>There is no one complete solution for developing Flex on Linux. <a href="http://ubuntuforums.org/showthread.php?t=559020" target="_blank">Many</a> <a href="http://ubuntuforums.org/showthread.php?t=457105" target="_blank">folks</a> <a href="http://ubuntuforums.org/showthread.php?t=914117" target="_blank">are looking</a> for one, but there is still none to be found. There are many open source tools that cover vast areas of the ActionScript and SWF world, most of the <a href="http://osflash.org/open_source_flash_projects" target="_blank">listed</a> on the wonderful <a href="http://osflash.org/" target="_blank">osflash.org</a>. Some of them are just right for you if you have a very specific task (like converting between formats, just compiling a bit of code, etc.), but none provide a complete IDE that lets you both drop in WYSIWYG elements and manually code some stuff, while easily maintaining complete control of what libraries are used.</p>
<h3>The Choice</h3>
<p>The choice then is to combine as few tools as possible. I have succeeded to get along with 2 tools: Flex Builder Linux Alpha, and Open Dialect.</p>
<p><a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/" target="_blank">Flex Builder Linux Alpha</a> is an Adobe free product, which is a Flex build environment as a plugin for Eclipse. Don&#8217;t worry about the Alpha part, it seems like a very stable product, and besides eating up some memory, I had no problems with it. It is actually an exact replica of the Flex Builder for Windows, without the features of Design View, some wizards and the profiler.</p>
<p><a href="http://dialect.openmodeling.net/wiki/OpenDialect" target="_blank">Open Dialect</a> is the most comprehensive attempt i&#8217;ve seen at creating a graphic WYSYWIG IDE for developing Flash. It has some basic characteristics of such an IDE, like a timeline with frames and key frames, and a graphic interface for creating shapes and editing their properties.</p>
<h3>The Method</h3>
<p>The development cycle is quite simple once you have these two tools running. Use Open Dialect for whatever graphic or animation you need, then grab the code from the &#8220;Document Script&#8221; tab, paste it to the Flex Builder in Eclipse, and start tweaking whatever is needed, add the MXML code etc. Open Dialect has great potential if it were to enable manual script editing, but <a href="http://dialect.openmodeling.net/ticket/44" target="_blank">currently it doesn&#8217;t</a>.</p>
<h3>Getting Things To Work</h3>
<p>Requirements and Installation of Flex Builder Linux Alpha are covered on Adobe&#8217;s <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/releasenotes.html" target="_blank">release notes</a>. In short, you got to have Eclipse 3.3.x, Sun JRE 1.5.x and Firefox, and just follow the installation instructions there. Be sure to set Eclipse&#8217;s browser to Firefox, as mentioned in the release notes, and there are also a <a href="http://freedomculture.wordpress.com/2007/05/13/adobe-flex-development-on-ubuntu-linux/" target="_blank">couple</a> of <a href="http://www.insideria.com/2008/04/step-by-step-setting-up-flex-b.html" target="_blank">guides</a> to walk you through. Oh, and it&#8217;s <span style="color: #993300"><strong>very important</strong></span> to follow <a href="http://rachaelandtom.info/content/how-make-your-eclipse-plugin-list-survive-eclipse-upgrade" target="_blank">these instructions</a> in order for your existing Eclipse plugins to survive the install. I installed the builder and lost my subclipse and collabnet merge plugin, and had to reinstall them.</p>
<p>Open Dialect uses the .NET framework, so you need <a href="http://mono-project.com/Main_Page" target="_blank">Mono</a> to run it. According to the <a href="http://dialect.openmodeling.net/wiki/Installation" target="_blank">installation instruction</a>, you can either download pre-compiled binaries of Open Dialect, or download the source and compile, but then you need MonoDevelop as well. In my case, using apt-get install mono was enough, and Open Dialect ran like a charm.</p>
<h3>Tweaking and Real Life Example</h3>
<p>Let&#8217;s go through an example of how to make a rounded rectangle that gets its color through a FlashVar.</p>
<p>In Open Dialect:</p>
<ol>
<li>Fire up Open Dialect.</li>
<li>Choose Rounded Rectangle from the Shapes list on the Items pane.</li>
<li>Draw a rounded rectangle on the canvas.</li>
<li>Set its X and Y to 0.</li>
<li>Go to the Document Script tab, select all the code and copy.<img class="alignnone size-full wp-image-153" src="http://orensol.com/files/2009/03/screenshot-open-dialect.png" alt="screenshot-open-dialect" width="500" height="371" /></li>
</ol>
<p>In Eclipse:</p>
<ol>
<li>Fire up Eclipse, create a new Flex Project, name it &#8220;Test&#8221;, and go through the creation wizard (next, next, finish).</li>
<li>You are now editing Test.mxml which is a skeleton Flex app file. Paste everything you copied from Open Dialect into Test.mxml, instead of its current content.</li>
<li>Save.</li>
<li>Hey, we&#8217;ve got errors! That&#8217;s right, BListBox type is not defined. It&#8217;s because the script uses the &#8220;ActionScriptComponents&#8221; library that comes with Open Dialect, in which BListBox is declared, but we haven&#8217;t imported it yet, let&#8217;s do it.</li>
<li>Copy the directory /path/to/opendialect/ActionScriptComponents to /path/to/workspace/Test/src/</li>
<li>Run again.</li>
<li>Viola! Rounded rectangle showing up!</li>
</ol>
<p>Now that we&#8217;ve covered the basics, let&#8217;s see how to pass FlashVars to our app. In order to do so, we need to understand what the Flex Builder environment does in build time &#8212; besides compiling the SWF, it also takes the file called index.template.html found in the html-template directory, and compiles it to a file called Test.html in the bin-debug directory, then fires this file in Firefox. So to pass FlashVars and process them in the script:</p>
<ol>
<li>Open index.template.html</li>
<li>Scroll down to the javascript part under &#8220;hasRequestedVersion&#8221;, this is the part that runs the swf on our page (assuming we have javascript enabled and the correct version of the flash player).</li>
<li>Under

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #ff0000;">&quot;src&quot;</span>, <span style="color: #ff0000;">&quot;${swf}&quot;</span>,</pre></div></div>

<p>add</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #ff0000;">&quot;FlashVars&quot;</span>, <span style="color: #ff0000;">&quot;color=0x000000&quot;</span>,</pre></div></div>

</li>
<li>Run once to see everything is working, and that we did not screw up the html template.</li>
<li>Add the following variable declaration where all other variable declarations are:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> rectColor:<span style="color: #0066CC;">Number</span>;</pre></div></div>

</li>
<li>In init(), add the following line at the top of the function:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">rectColor = Application.<span style="color: #006600;">application</span>.<span style="color: #006600;">parameters</span>.<span style="color: #0066CC;">color</span>;</pre></div></div>

</li>
<li>In the next line, where the shape properties are defined, change the last 2 colors (which in my case were 0&#215;000000,0xFF0000) to rectColor,rectColor:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">RRect1A.<span style="color: #006600;">Properties</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> ShapeProperties<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">120</span>,<span style="color: #cc66cc;">172</span>,<span style="color: #ff0000;">&quot;BRoundedRectangle&quot;</span>,<span style="color: #cc66cc;">1</span>,rectColor,rectColor<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

</li>
<li>Run again, see the rectangle is now black!</li>
</ol>
<h3>Conclusion</h3>
<p>The field of Flex development on Linux is of course bound to change as time goes by, but for now it seems like it is still in its early unstable days. This was a brief demonstration of how to harness the IDE power of Open Dialect, and the development and build power of Adobe&#8217;s Flex Builder Linux Alpha, to create a working environment for developing Flex apps on Linux. It is by no means the simplest solution &#8212; my guess is that running Flex Builder on a Windows VMware could be easier, albeit costly &#8212; but this solution that I presented is of course free and conforms to the open source spirit. And, most importantly, can get you developing flex apps quickly and easily.</p>
<p>Have fun flexing!</p>
<h4>A Couple of Sidenotes</h4>
<ul>
<li>You don&#8217;t have to use the ActionScriptComponents library that comes with Open Dialect if you don&#8217;t intend to use tweening or frame events. You can use the regular mx.controls classes for just plain drawing.</li>
<li>Flex applications tend to be big because the whole framework is included in the build. You can use RSL loading to cache the framework on the client side, or you can make a plain ActionScript Project instead of a Flex Project, still use mxml and just import the needed flash.* libraries. Both of these subjects are out of the scope of this post.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/03/24/flex-on-ubuntu-the-complete-how-to-guide/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Make Sure Those 404 and 500 Responses Are Long Enough</title>
		<link>http://orensol.com/2009/02/17/make-sure-those-404-and-500-responses-are-long-enough/</link>
		<comments>http://orensol.com/2009/02/17/make-sure-those-404-and-500-responses-are-long-enough/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:40:52 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[500]]></category>
		<category><![CDATA[Content-Length]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Reponse]]></category>
		<category><![CDATA[Status Code]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=116</guid>
		<description><![CDATA[<p>Internet Explorer is a term you can&#8217;t stay indifferent to. Whenever you hear somebody say it, they either say it with a respectful awe, or they utter it with a developer&#8217;s pain. Today I was on the latter side of this indifference, when I fought a Wordpress bug.</p>
<p>Internet Explorer <a href="http://support.microsoft.com/kb/q218155/" target="_blank">expects a minimum sized [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://www.ucc.ie/en/tcentre/InternetExplorer7/imgcol,40650,en.jpg" alt="" width="150" height="150" />Internet Explorer is a term you can&#8217;t stay indifferent to. Whenever you hear somebody say it, they either say it with a respectful awe, or they utter it with a developer&#8217;s pain. Today I was on the latter side of this indifference, when I fought a Wordpress bug.</p>
<p>Internet Explorer <a href="http://support.microsoft.com/kb/q218155/" target="_blank">expects a minimum sized response content</a> when receiving HTTP errors in the 400-500 area. If the content size received in the response is lower than this minimum, an arguably &#8220;Friendly HTTP Error Message&#8221; takes over, and displayed instead of the content.</p>
<p>This (rather obtrusive) behavior doesn&#8217;t go well with Wordpress wp_die() function, which is invoked on many occasions throughout the Wordpress code. This function sets the HTTP response status to 500, and then sends a very short html code containing any error message you&#8217;d like. These error messages are usually no more than a brief sentence, which results in a very small response content.</p>
<p>So take an IE7 browser, and try to post an empty comment on any Wordpress that is not upgraded to version 2.7 yet. See that friendly browser message? The same in Firefox produces the expected &#8220;Error: please type a comment.&#8221; message. Wordpress had already <a href="http://core.trac.wordpress.org/browser/trunk/wp-includes/functions.php?rev=10312" target="_blank">fixed this in 2.7</a> (you can copy their workaround) after some <a href="http://wordpress.org/support/topic/187581?replies=7" target="_blank">bug</a> <a href="http://wordpress.org/support/topic/144438?replies=7" target="_blank">reports</a>, but any installation prior to 2.7 which is still not upgraded (and many <a href="http://mu.wordpress.org/" target="_blank">MU</a> installations which always trail behind in the version releases) has this.</p>
<p>For any application other than Wordpress, be sure to go over <a href="http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml" target="_blank">this table of minimum content size</a> for each HTTP status error code, and make sure your responses are long enough.</p>
<p>Apparently, sometimes being laconic is bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/02/17/make-sure-those-404-and-500-responses-are-long-enough/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->