<?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>futtta&#039;s blog &#187; Web development</title>
	<atom:link href="http://blog.futtta.be/category/rss-able/technology/internet/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.futtta.be</link>
	<description>Frank Goossens&#039; Twitterless twaddle</description>
	<lastBuildDate>Fri, 30 Jul 2010 08:16:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Lovin&#8217; the WordPress plugin ecosystem</title>
		<link>http://blog.futtta.be/2010/05/25/lovin-the-wordpress-plugin-ecosystem/</link>
		<comments>http://blog.futtta.be/2010/05/25/lovin-the-wordpress-plugin-ecosystem/#comments</comments>
		<pubDate>Tue, 25 May 2010 03:53:54 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[rants & raves]]></category>
		<category><![CDATA[lyte]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-youtube-lyte]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=3052</guid>
		<description><![CDATA[I&#8217;m a sucker for simple things and in my book, WordPress (the open source software) is a great example of a simple yet powerful solution for publishing on the web. The last few days I experienced their plugin-ecosystem to be just as simple and powerful. If you have a plugin to share and you: register [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a sucker for simple things and in my book, WordPress (the open source software) is a great example of a simple yet powerful solution for publishing on the web. The last few days I experienced their plugin-ecosystem to be just as simple and powerful.</p>
<p>If you have a plugin to share and you:</p>
<ol>
<li><a title="wordpress.org plugin registration-page" href="http://wordpress.org/extend/plugins/register.php">register on wordpress.org</a></li>
<li><a title="plugin submittal form" href="http://wordpress.org/extend/plugins/add/">fill out a form</a> to submit your plugin for inclusion in their repository</li>
<li>after confirmation upload your code (together with a <a title="structured and marked up with markdown; description of readme.txt on wp.org" href="http://wordpress.org/extend/plugins/about/readme.txt">structured readme-file</a>) <a title="svn for dummies on wp.org" href="http://wordpress.org/extend/plugins/about/svn/">via svn</a></li>
</ol>
<p>Then boom, automatically;</p>
<ul>
<li><a title="wp-youtube-lyte page" href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">plugin pages</a> (for description, installation, faq, changelog, &#8230;) are created and populated with information from the readme and base php-file</li>
<li>a zip-file is created containing your stable  version</li>
<li>your plugin is listed on the &#8220;<a title="newest plugins op wp.org" href="http://wordpress.org/extend/plugins/browse/new/">new plugins</a>&#8221; page</li>
</ul>
<p>Before you know it, you&#8217;ve got a bunch of real users (<a title="wordpress wp-youtube-lyte announcement on blog.futtta.be" href="http://blog.futtta.be/2010/05/18/lite-youtube-embeds-in-wordpress/">wp-youtube-lyte</a> was downloaded 128 times in 2 days) who can rate your plugin and provide you with feedback. And every time you upload a new stable version via svn, a new zip-file is created and your users will get a notification in their wp-admin pages, allowing them to upgrade by simply clicking that upgrade link. Don&#8217;t you love it when a plan comes together?</p>
<p>But enough raving already, got to go create that admin-page for my plugin now, as requested by a user. I&#8217;m a sucker for real users!</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2009/09/17/html5-offline-webapps-vs-google-gears-localserver/' rel='bookmark' title='Permanent Link: HTML5 offline webapps vs Google Gears Localserver'>HTML5 offline webapps vs Google Gears Localserver</a></li>
<li><a href='http://blog.futtta.be/2010/04/06/wordpress-galore/' rel='bookmark' title='Permanent Link: WordPress galore: plugin bugs, android app, json-api &#038; wp 3.0'>WordPress galore: plugin bugs, android app, json-api &#038; wp 3.0</a></li>
<li><a href='http://blog.futtta.be/2007/07/04/stoute-wordpress-upgrade-maakt-posts-van-pages/' rel='bookmark' title='Permanent Link: Stoute wordpress upgrade maakt posts van pages?'>Stoute wordpress upgrade maakt posts van pages?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/05/25/lovin-the-wordpress-plugin-ecosystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web API security basics</title>
		<link>http://blog.futtta.be/2010/05/14/web-api-security-basics/</link>
		<comments>http://blog.futtta.be/2010/05/14/web-api-security-basics/#comments</comments>
		<pubDate>Fri, 14 May 2010 17:21:03 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[csrf]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonp]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=3022</guid>
		<description><![CDATA[When I proposed the lead developer of an open source web application to enable JSONP for the API, the developer replied: The whole thing sounds easy enough to implement, but I have some doubts that it will open the project to XSS attack of some sort. Don&#8217;t really know why, though. We mailed a bit [...]]]></description>
			<content:encoded><![CDATA[<p>When I proposed the lead developer of an open source web application to enable JSONP for the API, the developer replied:</p>
<blockquote><p>The whole thing sounds easy enough to implement, but I  have some doubts  that it will open the project to XSS attack of some  sort. Don&#8217;t really know  why, though. <img src='http://blog.futtta.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p></blockquote>
<p>We mailed a bit more about the risks of cross site scripting and then he wrote the following:</p>
<blockquote><p>Sadly we can have malicious JS problems since cleaning up of incoming data  is optional.</p></blockquote>
<p>For an unrelated project I asked about authentication for a write-operation in the API and the reply was:</p>
<blockquote><p>Authentication is not in the API yet. Currently you must include a session cookie along with API requests to perform a write, but the cookie itself is the one you get from logging in [in the web front end] as you would normally.</p></blockquote>
<p>Which sounds a lot like &#8220;we support cross site request forgery out of the box&#8221; &#8230;</p>
<p>As with normal web applications, web API-security is an important (but complex) issue, which is not always easy to grasp. Based on a basic understanding of things, the following guidelines can go a long way into securing things both on the API-side and the client:</p>
<ol>
<li>Know who you&#8217;re dealing with; disable API-access for your users by default (allowing them to opt-in), provide bullet-proof <a title="owasp authentication cheat sheet" href="http://www.owasp.org/index.php/Authentication_Cheat_Sheet">authentication</a> and <a title="Owasp Authentication Cheat Sheet: session management" href="http://www.owasp.org/index.php/Authentication_Cheat_Sheet#Session_Management_General_Guidelines">session  management</a> in the API and throw in <a title="owasp: Synchronizer Token Pattern" href="http://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet#General_Recommendation:_Synchronizer_Token_Pattern">a synchronizer token</a> to prevent <a title="owasp: cross site request forgery" href="http://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet">cross site request forgery</a></li>
<li>Never trust input from users or external systems; decide what to trust and <a title="owasp data validation strategies" href="http://www.owasp.org/index.php/Data_Validation#Data_Validation_Strategies">filter out everything that&#8217;s not in that white-list </a>(SQL-code, server-side code, javascript, and even html and css)</li>
</ol>
<p>If you apply these basic principles to JSONP (make sure to filter the callback-parameter and set the correct content-type in your response) you&#8217;ll have a whole lot less to worry about!</p>
<p>More info:</p>
<ul>
<li><a title="owasp top 10 2010; must-read!" href="http://www.owasp.org/index.php/Top_10_2010-Main">Owasp top 10 Application Security Risks 2010</a> (released on April 19th)</li>
<li><a title="OWASP AJAX Security Guidelines" href="http://www.owasp.org/index.php?title=OWASP_AJAX_Security_Guidelines">Owasp Ajax security guidelines</a></li>
<li><a title="htmlpurifier.org; great easy to use html-filtering library" href="http://htmlpurifier.org/">HTML Purifier</a>: HTML filter library written in PHP.</li>
<li><a title="xss/csrf dangers of JSONP (auto-translated from swedish!)" href="http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=1&amp;eotf=1&amp;u=http%3A%2F%2Fowaspsweden.blogspot.com%2F2010%2F03%2Fjsonp-medveten-xss-med-risk-for-csrf.html&amp;sl=sv&amp;tl=en">The risk of XSS and CSRF with JSONP</a> (auto-translated from Swedish)</li>
</ul>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2008/12/29/webapp-security-is-mandatory-even-for-spammy-virals/' rel='bookmark' title='Permanent Link: WebApp Security is mandatory (even for spammy virals)'>WebApp Security is mandatory (even for spammy virals)</a></li>
<li><a href='http://blog.futtta.be/2009/08/13/warning-your-computer-might-be-infected/' rel='bookmark' title='Permanent Link: Warning: your computer might be infected!'>Warning: your computer might be infected!</a></li>
<li><a href='http://blog.futtta.be/2010/04/09/no-more-jsonp-for-google-geocoding-webservice/' rel='bookmark' title='Permanent Link: No more jsonp for Google geocoding webservice?'>No more jsonp for Google geocoding webservice?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/05/14/web-api-security-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lite YouTube embeds free for all!</title>
		<link>http://blog.futtta.be/2010/04/28/lite-youtube-embeds-free-for-all/</link>
		<comments>http://blog.futtta.be/2010/04/28/lite-youtube-embeds-free-for-all/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 16:54:07 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[high performance web]]></category>
		<category><![CDATA[lyte]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2993</guid>
		<description><![CDATA[It&#8217;s all nice and well to hammer out some code to create a lite YouTube embedded player, but as long as that embed-code can&#8217;t simply be copy/pasted from the YouTube-page, it&#8217;s all pretty theoretical, no? Well here you are, a simple bookmarklet that will display the LYTE-code when you&#8217;re on a random YouTube video page: [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s all nice and well to hammer out some <a title="my previous post describing the problem with youtube embeds and the alternative; Lite YouTube Embeds" href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/">code to create a lite YouTube embedded player</a>, but as long as that embed-code can&#8217;t simply be copy/pasted from the YouTube-page, it&#8217;s all pretty theoretical, no?</p>
<p>Well here you are, a simple bookmarklet that will display the LYTE-code when you&#8217;re on a random YouTube video page:</p>
<p><a href="javascript:(function(){d=document;l_bm=d.createElement('script');l_bm.src='http://futtta.be/lyte/lyte_bookmarklet.js';d.getElementsByTagName('head')[0].appendChild(l_bm);})()"><img class="aligncenter size-full wp-image-2995" title="this youtube lyte bookmarklet in action" src="http://blog.futtta.be/wp-content/uploads/2010/04/youtube_lyte_bookmarklet.png" alt="" width="600" height="66" /></a></p>
<p>Want this? Then just do this:</p>
<ol>
<li>drag this <a title="LYTE bookmarklet" href="javascript:(function(){d=document;l_bm=d.createElement('script');l_bm.src='http://futtta.be/lyte/lyte_bookmarklet.js';d.getElementsByTagName('head')[0].appendChild(l_bm);})()">LYTE bookmarklet</a> to your bookmarks toolbar</li>
<li>go to <a title="not so random, nice song; Rogue Wave with &quot;Lake Michigan&quot;" href="http://www.youtube.com/watch?v=DlOl9LOUQ0g">a random youtube-video page</a></li>
<li>click on the bookmark(let)</li>
<li>copy/paste the LYTE code on top of the page into your html</li>
<li>enjoy Lite YouTube Embeds (i.e. 17KB instead of 150KB with a normal embed) on your site!</li>
</ol>
<p>Happy embedding!</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/' rel='bookmark' title='Permanent Link: High performance YouTube embeds'>High performance YouTube embeds</a></li>
<li><a href='http://blog.futtta.be/2010/06/16/embedding-html5-youtube-video-with-wp-youtube-lyte/' rel='bookmark' title='Permanent Link: Embedding HTML5 YouTube video with WP YouTube Lyte'>Embedding HTML5 YouTube video with WP YouTube Lyte</a></li>
<li><a href='http://blog.futtta.be/2010/05/18/lite-youtube-embeds-in-wordpress/' rel='bookmark' title='Permanent Link: Lite YouTube Embeds in WordPress'>Lite YouTube Embeds in WordPress</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/04/28/lite-youtube-embeds-free-for-all/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>High performance YouTube embeds</title>
		<link>http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/</link>
		<comments>http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 17:26:15 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[tubeken]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[high performance web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lyte]]></category>
		<category><![CDATA[steve souders]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2979</guid>
		<description><![CDATA[It&#8217;s all about speed! I mean, you want your visitors to stick around, enjoying your content instead of waiting for stuff to download, no? And I bet you would love Google to consider your site quick, now that speed has been confirmed to have an impact on search ranking? &#8220;High Performance web sites&#8221;-guru Steve Souders [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s <a href="http://blog.futtta.be/2010/03/11/speed-up-your-wordpress-site/">all about speed</a>! I mean, you want your visitors to stick around, <a href="http://blog.futtta.be/wp-content/uploads/2010/03/porn_loading.png">enjoying your content instead of waiting for stuff to download</a>, no? And I bet you would love Google to consider your site quick, <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">now that speed has been confirmed to have an impact on search ranking</a>?</p>
<p><a title="steve souders' bio (ex-yahoo performance czar, now at google)" href="http://stevesouders.com/bio.php">&#8220;High Performance web sites&#8221;-guru Steve Souders</a> is doing incredible work <a title="steve souders' p3pc posts" href="http://stevesouders.com/p3pc/">studying the impact of 3rd party content</a> -and especially javascript-based services such as analytics and bannering- on the performance of a web site.</p>
<p>An entirely different type of 3rd party content is Flash video, especially YouTube embeds, but there are a number of indicators that these indeed do impact performance as well:</p>
<ul>
<li>opening a page with embedded YouTube can take some time when on dialup (or mobile data)</li>
<li>YouTube-heavy pages tend to slow down older computers (flashblock or adblock anyone?)</li>
<li>Facebook doesn&#8217;t really embed YouTube by default, but uses a placeholder with a thumbnail instead that is replaced by the embedded YouTube only when clicked</li>
<li>Google Webmaster Tools &#8220;Site Performance&#8221; seems to sometimes single out pages with YouTube embeds (e.g. stating that there is a DNS-resolution overhead)</li>
</ul>
<p>Indeed, when testing <a title="page with some text and 2 youtube embeds" href="http://futtta.be/lyte/lytetest_youtube.html">this simple page with some text and 2 embedded YouTube clips</a> on <a title="http://www.webpagetest.org/" href="http://www.webpagetest.org/">webpagetest.org</a>, these were the main results (<a title="webpagetest.org full result for normal youtube embed" href="http://www.webpagetest.org/result/100423_7WPX/">full results including nice graphs here</a>):</p>
<ul>
<li>(base) download complete: 0.356s for 2KB</li>
<li>start render: 0.426s</li>
<li>full page download complete: <strong>3.005s for 315KB</strong></li>
</ul>
<p>There&#8217;s good and bad news in those figures. As could be expected the YouTube Flash embed doesn&#8217;t impact the rendering of the base page. But 2.6 seconds and 312KB just to display 2 video&#8217;s a visitor might not even bother to look at (I bet that the click-rate for embedded YouTube video is somewhere between 2 and 20%), that&#8217;s &#8230; sub-optimal?</p>
<p>So I threw some JavaScript at my computer to build an alternative to the default YouTube embed, the main goal being to build a Flash-less initial view with only a few lines of html/javascript which at some point people could copy/paste in their site just like they do now. And LYTE (Lite YouTube Embed) came into the world.</p>
<p>The main results when testing <a title="lyte testpage" href="http://futtta.be/lyte/lytetest_lyte.html">this LYTE-test-page</a> on webpagetest.org (<a title="webpagetest.org full result for lyte embed" href="http://www.webpagetest.org/result/100423_7WQ9/">full results here</a>):</p>
<ul>
<li>(base) download complete: 0.324s for 4KB (which is marginally faster)</li>
<li>start render: 0.363s (again marginally faster)</li>
<li>full page download complete: <strong>0.803s for 35KB</strong> (leaner, meaner and faster!)</li>
</ul>
<p>The code that would have to be copy/pasted (multi-line for clarity):<br />
<code>&lt;div class="lyte" id="gnDh6PqWqD8" style="width:480;height:385;"&gt;&lt;noscript&gt;&lt;a href="http://youtu.be/gnDh6PqWqD8"&gt;Watch on YouTube&lt;/a&gt;&lt;/noscript&gt;<br />
&lt;script&gt;(function(){d=document;if(!document.getElementById('lytescr')){lyte=d.createElement('script');lyte.async=true;lyte.id="lytescr";lyte.src="http://futtta.be/lyte/lyte.js";d.getElementsByTagName('head')[0].appendChild(lyte)}})();&lt;/script&gt;&lt;/div&gt;</code></p>
<p>The nitty-gritty (do skip if you&#8217;re not inclined to get aroused by technical details): this code attaches (a minified version of) <a title="lyte.js, where the real work is done" href="http://futtta.be/lyte/lyte.js">lyte.js</a> to the page&#8217;s head. The real work is done in that javascript-file: get all divs with class-name &#8220;lyte&#8221; (<a title="no getElementsByClassName in IE means my lyte.js got more then 50% bigger. bummer!" href="http://code.google.com/p/getelementsbyclassname/">with a hack for friggin&#8217; IE inlined</a>), use the videoid which is in the divs&#8217; id to fetch the thumbnail and title from YouTube, display these in a fashion which is very YouTube-like and add an onclick eventhandler to replace the fake with a real player when clicked (and remove the eventhandler to clean things up).</p>
<p>So using LYTE you can embed YouTube in such a way that the amount of data, the total download time and the total rendering time are significantly lower, without loosing any functionality.</p>
<p>And this -to conclude this long post- is what LYTE looks like (soundtrack by Nôze -- &#8220;Meet me in the toilet&#8221;, it&#8217;s Friday after all);<br />
<div class="lyte" id="YUzoE-Bzy0w" style="width:640;height:385;"><noscript><a href="http://youtu.be/YUzoE-Bzy0w"><img src="http://img.youtube.com/vi/YUzoE-Bzy0w/default.jpg"></a></noscript><script>var bU='http://blog.futtta.be/wp-content/plugins/wp-youtube-lyte/lyte/';pW='640';pH='385';(function(){d=document;if(!document.getElementById('lytescr')){lyte=d.createElement('script');lyte.async=true;lyte.id='lytescr';lyte.src='http://blog.futtta.be/wp-content/plugins/wp-youtube-lyte/lyte/lyte-newtube-min.js';d.getElementsByTagName('head')[0].appendChild(lyte)}})();</script></div><div id="lytelinks" style="margin:0px 0px 10px 0px;">Watch this video <a href="http://youtu.be/YUzoE-Bzy0w">on YouTube</a> or on <a href="http://icant.co.uk/easy-youtube/?http://www.youtube.com/watch?v=YUzoE-Bzy0w">Easy Youtube</a>.</div></p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2010/04/28/lite-youtube-embeds-free-for-all/' rel='bookmark' title='Permanent Link: Lite YouTube embeds free for all!'>Lite YouTube embeds free for all!</a></li>
<li><a href='http://blog.futtta.be/2010/06/16/embedding-html5-youtube-video-with-wp-youtube-lyte/' rel='bookmark' title='Permanent Link: Embedding HTML5 YouTube video with WP YouTube Lyte'>Embedding HTML5 YouTube video with WP YouTube Lyte</a></li>
<li><a href='http://blog.futtta.be/2010/05/18/lite-youtube-embeds-in-wordpress/' rel='bookmark' title='Permanent Link: Lite YouTube Embeds in WordPress'>Lite YouTube Embeds in WordPress</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>No more jsonp for Google geocoding webservice?</title>
		<link>http://blog.futtta.be/2010/04/09/no-more-jsonp-for-google-geocoding-webservice/</link>
		<comments>http://blog.futtta.be/2010/04/09/no-more-jsonp-for-google-geocoding-webservice/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 17:13:58 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[google geocoding webservice]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonp]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2942</guid>
		<description><![CDATA[I needed to do some reverse geocoding in a javascript webapp. The Google Maps API worked flawlessly, but it seemed overkill to load all that javascript just to do one lousy reverse geocoding lookup (esp. on a mobile device, my target platform).  I searched some more and found the Google geocoding webservice, which is invoked [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to do some reverse geocoding in a javascript webapp. The <a href="http://code.google.com/apis/maps/documentation/v3/basics.html">Google Maps API</a> worked flawlessly, but it seemed overkill to load all that javascript just to do one lousy reverse geocoding lookup (esp. on a mobile device, my target platform).  I searched some more and found the Google geocoding webservice, which is invoked with a simple HTTP GET request and returns the response in JSON. <a title="v2 geocoding webservice documentation" href="http://code.google.com/apis/maps/documentation/geocoding/v2/index.html">Version 2 of this service</a> works great, as you can specify a callback-function to do <a title="jsonp on wikipedia" href="http://en.wikipedia.org/wiki/JSONP#JSONP">jsonp</a> (a simple method to allow for cross domain ajax requests),</p>
<p>This example request for v2, <a title="reply is a json-file, your browser will want to download" href="http://maps.google.com/maps/geo?q=51,4&amp;sensor=false&amp;output=json&amp;callback=parseme">http://maps.google.com/maps/geo?q=51,4&amp;sensor=false&amp;output=json&amp;callback=parseme</a>, results in a response containing a call to your own &#8220;parseme&#8221;-function, with the json-object as the payload;</p>
<blockquote><p><code>parseme &amp;&amp; parseme( {<br />
"name": "51,4",<br />
"Status": {<br />
"code": 200,<br />
"request": "geocode"<br />
},<br />
"Placemark": [ {<br />
"id": "p1",<br />
"address": "Brukkelen 191, 9200 Dendermonde, Belgium",<br />
...<br />
]})</code></p></blockquote>
<p>But a month ago Google <a href="http://googlegeodevelopers.blogspot.com/2010/03/introducing-new-google-geocoding-web.html">announced  a new version of their geocoding webservice</a> and <a title="v2 geocoding webservice documentation" href="http://code.google.com/apis/maps/documentation/geocoding/v2/index.html">the documentation for V2</a> mentioned that it was deprecated in favor of the <a href="http://code.google.com/apis/maps/documentation/geocoding/index.html"> Geocoding V3 Web Service.</a> so I switched to the new API, only to discover that <a title="Mike Gleason Jr. about possible reasons for the lack of callbacks in gecoding webservices V3" href="http://blog.mikecouturier.com/2009/11/jsonp-and-google-maps-api-geocoder-not.html">callbacks aren&#8217;t supported any more</a>.</p>
<p>An example request for v3 <a title="v3 geocoding request example" href="http://maps.google.com/maps/api/geocode/json?latlng=51,4&amp;sensor=false&amp;callback=parseme">http://maps.google.com/maps/api/geocode/json?latlng=51,4&amp;sensor=false&amp;callback=parseme</a> results in nothing but the javascript-object:</p>
<blockquote><p><code>{<br />
"status": "OK",<br />
"results": [ {<br />
"types": [ "street_address" ],<br />
"formatted_address": "Brukkelen 191, 9200 Dendermonde, Belgium",<br />
...<br />
]})</code></p></blockquote>
<p>And that, my dear fellow travellers, sucks big time. JSON without the P means we&#8217;re back to useless proxy-scripts on our servers. So until Google lets Jason pee (sorry folks, I just had to write this) in the V3 geocoding webservice, I&#8217;ll continue using the deprecated V2 with sweet -but undocumented- callback!</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2009/12/23/switching-from-google-reader-to-tiny-tiny-rss/' rel='bookmark' title='Permanent Link: Switching from Google Reader to Tiny Tiny RSS'>Switching from Google Reader to Tiny Tiny RSS</a></li>
<li><a href='http://blog.futtta.be/2010/01/06/persistent-offline-data-storage-without-html5-webdb/' rel='bookmark' title='Permanent Link: Persistent offline data storage without html5 webdb'>Persistent offline data storage without html5 webdb</a></li>
<li><a href='http://blog.futtta.be/2007/06/11/onclick-event-handler-in-a-hrefs/' rel='bookmark' title='Permanent Link: Onclick event handler in A HREF&#8217;s?'>Onclick event handler in A HREF&#8217;s?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/04/09/no-more-jsonp-for-google-geocoding-webservice/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Avoid iframe-scrollbars with squeezeFrame.js</title>
		<link>http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/</link>
		<comments>http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 23:30:07 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scrollbars]]></category>
		<category><![CDATA[squeezeFrame.js]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2914</guid>
		<description><![CDATA[I know, this seems to have become an obsession of mine, but here I am again with a follow-up on my iframes-tips blogpost. You might remember I advised against disabling scrollbars on iframes, because; Disabling them will render the iframe partially inaccessible for some of your users, because the size your iframe-content needs, depends on [...]]]></description>
			<content:encoded><![CDATA[<p>I know, this seems to have become an obsession of mine, but here I am again with a follow-up on <a href="http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/">my iframes-tips blogpost</a>. You might remember I advised against disabling <strong>scrollbars on iframes</strong>, because;</p>
<blockquote><p>Disabling them will render the iframe partially inaccessible for some of  your users, because the size your iframe-content needs, depends on  things outside your control such as operating system &amp; versions  (e.g. font &amp; screen resolution), browser (e.g.  css-implementation)  and browser configuration (e.g. non-default font-size).</p></blockquote>
<p>But what if you could <strong>resize</strong> (generally: zoom out) the iframe-content to <strong>perfectly fit the available width and height</strong>, thus avoiding vertical and especially <strong>horizontal scrollbars</strong>? Well, that is exactly what <strong><a title="sqeeuzeFrame.js demo page" href="http://futtta.be/squeezeFrame/">squeezeFrame.js</a></strong> tries to do (using <a title="css zoom on css3.com" href="http://www.css3.com/css-zoom/">css zoom</a> and <a title="-moz-transform:scale on developer.mozilla.com" href="https://developer.mozilla.org/en/CSS/-moz-transform#scale">-moz-transform:scale</a> in Firefox)! Just include <a title="the goods: sqeeuzeFrame.js" href="http://futtta.be/squeezeFrame/squeezeFrame.js">the javascript-file</a> in the iframe-content page and set a few options if you want to change the default behavior (which is: zoom in/out for width only, max. + or &#8211; 5%).</p>
<p><a title="sqeeuzeFrame.js demo page" href="http://futtta.be/squeezeFrame/">squeezeFrame.js</a> was tested successfully in<strong> Firefox 3.6, IE6, Safari4 and Chrome4</strong>, but does not work in Opera 10.5. More info (including some &#8220;known issues&#8221;) can be found <a title="sqeeuzeFrame.js demo page" href="http://futtta.be/squeezeFrame/">on the demo-page</a> and <a title="the goods: sqeeuzeFrame.js" href="http://futtta.be/squeezeFrame/squeezeFrame.js">in the javascript-code</a> off course.</p>
<p>As always; reply in the comments or <a title="contact-page on blog.futtta.be" href="../contact/">contact me</a> if you find bugs or have problems.</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/' rel='bookmark' title='Permanent Link: 5 tips to tackle the problem with iframes'>5 tips to tackle the problem with iframes</a></li>
<li><a href='http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/' rel='bookmark' title='Permanent Link: Fix iframe-positioning problem with frameMagic.js'>Fix iframe-positioning problem with frameMagic.js</a></li>
<li><a href='http://blog.futtta.be/2009/11/09/5-valuable-cufon-tips/' rel='bookmark' title='Permanent Link: 5 valuable Cufón tips'>5 valuable Cufón tips</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up your (WordPress-)site!</title>
		<link>http://blog.futtta.be/2010/03/11/speed-up-your-wordpress-site/</link>
		<comments>http://blog.futtta.be/2010/03/11/speed-up-your-wordpress-site/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 20:58:22 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[css-js-booster]]></category>
		<category><![CDATA[pingdom]]></category>
		<category><![CDATA[site performance]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp super cache]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2877</guid>
		<description><![CDATA[Google likes fast! Visitors like fast! So why don&#8217;t you go make your site really fast? Suppose you just bought yourself hosting and you just installed WordPress for blogging or lightweight-CMS-purposes, how can you improve your site&#8217;s performance in that case? Easy! speed up PHP: use a caching optimizer (I use APC) to significantly speed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="&quot;I sure hope that porn-site finishes loading before my  Viagra wears off&quot;" src="http://blog.futtta.be/wp-content/uploads/2010/03/porn_loading.png" alt="" width="253" height="179" /><a title="google's cutts says speed might impact site ranking soon" href="http://videos.webpronews.com/2009/11/13/matt-cutts-interview/">Google likes fast</a>! <a title="some random article about the impact of site speed on online sales, pretty impressive (on getelastic.com)" href="http://www.getelastic.com/performance/">Visitors like fast</a>! So why don&#8217;t you go make your site really fast?</p>
<p>Suppose you just bought yourself hosting and you just installed <a title="wordpress.org, don't know why I still link there, I mean, you KNOW wordpress, don't you? no? really? ok then ..." href="http://wordpress.org/">WordPress</a> for blogging or <a title="cmswatch sees some wordpress-opportunities for SMB's" href="http://www.cmswatch.com/Blog/1827-Evaluating-WordPress-as-a-Web-CMS">lightweight-CMS-purposes</a>, how can you improve your site&#8217;s performance in that case? Easy!</p>
<ol>
<li><strong>speed up PHP</strong>: use <a title="wikipedia list of php accelerators" href="http://en.wikipedia.org/wiki/List_of_PHP_accelerators">a caching optimizer</a> (<a title="blogpost: used eaccelerator before, switched to apc" href="http://blog.futtta.be/2008/10/11/trading-eaccelerator-for-apc/">I use APC</a>) to significantly speed up PHP performance (don&#8217;t bother  signing up for shared hosting with a company that doesn&#8217;t offer PHP with acceleration).</li>
<li><strong>cache dynamic output</strong>: install <a title="wp super cache plugin page on wordpress.org" href="http://wordpress.org/extend/plugins/wp-super-cache/">the &#8220;WP Super Cache&#8221; WordPress plugin</a>. Configure and then forget about it; if you create/edit a blogpost, impacted pages are automatically removed from cache.</li>
<li><strong>optimize CSS and JS</strong>: install <a title="css js booster plugin on wordpress.org" href="http://wordpress.org/extend/plugins/css-js-booster/">the &#8220;CSS JS booster&#8221; WordPress plugin</a>, which (amongst other things) grabs all CSS and JS from WordPress and Plugins and outputs it in one CSS- and one JS-file (some plugins, e.g. <a title="Sociable plugin on wordpress.org" href="http://wordpress.org/extend/plugins/sociable/">Sociable</a> and <a title="wp mobile pack on wp.org" href="http://wordpress.org/extend/plugins/wordpress-mobile-pack/">WordPress Mobile Pack</a>, might need tweaking of the css media-attribute though)</li>
<li><strong>avoid calling 3rd party javascript</strong>: tracking (e.g. Google Analytics, which I removed), widgets (e.g. Twitter badges) or other 3rd party gadgets (e.g. AddToAny, <a title="I removed AddToAny because I considered it spyware." href="http://blog.futtta.be/2010/01/22/add-to-any-removed-from-here/">which I removed</a>) can slow down your site&#8217;s performance significantly</li>
<li><strong>optimize images</strong>: fire up your favorite photo editor and make that image just a bit smaller, use an acceptable level of compression (I end up between 70 and 80% for JPEG&#8217;s, depending on the image) and upload to <a href="http://www.smushit.com/ysmush.it/">smushit.com</a> to squeeze out the last optimization-drop (example; I used <a title="holland on flickr" href="http://farm3.static.flickr.com/2473/3588602435_f3d41c1b88_m.jpg">a 20KB picture from Flickr</a>, resized it to 80%, saved it with 77% compression and smushed it to <a title="you might see some compression artefacts, but i don't really mind" href="http://blog.futtta.be/wp-content/uploads/2010/03/holland.jpg">end up with a mere 6KB</a>).</li>
</ol>
<p>The impact of a number of these steps can be measured easily; below are the response times of my blog&#8217;s homepage (the  html including css, js and images) as measured by <a title="pingdom tools full page test" href="http://tools.pingdom.com/fpt/">Pingdom Tool&#8217;s Full Page Test</a>.</p>
<ol>
<li>default WordPress (on a Linux VPS with 320Mb RAM memory): <a title="pingdom fpt result: 6.5s" href="http://tools.pingdom.com/fpt/default.asp?url=http%3a%2f%2fblog.futtta.be%2f&amp;id=1961852">6.5 seconds</a></li>
<li>(1)  with PHP APC activated: <a title="pingdom fpt result: 4.1s" href="http://tools.pingdom.com/fpt/default.asp?url=http%3a%2f%2fblog.futtta.be%2f&amp;id=1959390">4.1 seconds</a></li>
<li>(2) with WP Super Cache: <a title="pingdom fpt result: 3.1s" href="http://tools.pingdom.com/fpt/default.asp?url=http%3a%2f%2fblog.futtta.be%2f&amp;id=1959376">3.1 seconds</a></li>
<li>(3) with CSS JS Booster: <a title="pingdom fpt result: 1.3s" href="http://tools.pingdom.com/fpt/default.asp?url=http%3a%2f%2fblog.futtta.be%2f&amp;id=1956675">1.3 seconds</a></li>
</ol>
<p>So there you have it, from 6.5 to 1.3 seconds in only 5 easy steps! WordPress specific, but easily applicable to other platforms as well. Now go and make your site fast! And then go and make it even faster!</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2009/10/22/blog-futtta-be-going-mobile-with-wptouch/' rel='bookmark' title='Permanent Link: blog.futtta.be going mobile with WPtouch'>blog.futtta.be going mobile with WPtouch</a></li>
<li><a href='http://blog.futtta.be/2010/04/06/wordpress-galore/' rel='bookmark' title='Permanent Link: WordPress galore: plugin bugs, android app, json-api &#038; wp 3.0'>WordPress galore: plugin bugs, android app, json-api &#038; wp 3.0</a></li>
<li><a href='http://blog.futtta.be/2010/05/18/lite-youtube-embeds-in-wordpress/' rel='bookmark' title='Permanent Link: Lite YouTube Embeds in WordPress'>Lite YouTube Embeds in WordPress</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/03/11/speed-up-your-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fix iframe-positioning problem with frameMagic.js</title>
		<link>http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/</link>
		<comments>http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:20:04 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[blank page]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2871</guid>
		<description><![CDATA[A short followup on my previous post about iframes; as I happen to like simple drop-in solutions, I updated the javascript that handles the &#8216;blank 2nd page in an iframe bug&#8217; to automagically work upon inclusion in the html. So if you happen to have problems with the positioning of 2nd (or later) pages in [...]]]></description>
			<content:encoded><![CDATA[<p>A short followup on <a title="&quot;5 tips to tackle the problem with iframes&quot; on blog.futtta.be" href="http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/">my previous post about iframes</a>; as I happen to like simple drop-in solutions, I updated the javascript that handles the &#8216;blank 2nd page in an iframe bug&#8217; to automagically work upon inclusion in the html.</p>
<p>So if you happen to have problems with the positioning of 2nd (or later) pages in iframes (due to the top part of the iframe not being visible in the &#8216;viewport&#8217;), just upload <a title="frameMagic.js standalone javascript to handle &quot;blank&quot; 2nd pages in an iframe" href="http://futtta.be/frameMagic/frameMagic.js">frameMagic.js</a> to your webserver and add the following to the head of your html to ease your iframe-blues;</p>
<blockquote><p><code>&lt;script type="text/javascript" src="path/to/frameMagic.js"&gt;&lt;/script&gt;</code></p></blockquote>
<p>Optionally you can specify which iframes are to be treated this way (excluding the other ones) by doing</p>
<blockquote><p><code>&lt;script type="text/javascript"&gt;<br />
var  fM_conf="iFrame1,iFrame3";<br />
&lt;/script&gt;</code></p></blockquote>
<p>You can find more information and examples on <a title="my frameMagic 'project' page ;-)" href="http://futtta.be/frameMagic/">http://futtta.be/frameMagic</a>.</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/' rel='bookmark' title='Permanent Link: 5 tips to tackle the problem with iframes'>5 tips to tackle the problem with iframes</a></li>
<li><a href='http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/' rel='bookmark' title='Permanent Link: Avoid iframe-scrollbars with squeezeFrame.js'>Avoid iframe-scrollbars with squeezeFrame.js</a></li>
<li><a href='http://blog.futtta.be/2009/08/24/http-upload-mime-type-hell/' rel='bookmark' title='Permanent Link: HTTP upload MIME type hell'>HTTP upload MIME type hell</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 tips to tackle the problem with iframes</title>
		<link>http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/</link>
		<comments>http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 14:53:34 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2838</guid>
		<description><![CDATA[Iframes have always been frowned upon by web-purists (confession: myself included). But things are never black and white and sometimes iframes can be the best solution for a problem (you could substitute &#8220;&#8216;iframes&#8221; with &#8220;Flash&#8221; in the previous 2 sentences, but that&#8217;s another discussion). So here are 5 quick tips which might lessen some of [...]]]></description>
			<content:encoded><![CDATA[<p>Iframes have always been <strong>frowned upon</strong> by web-purists (confession: myself included). But things are never black and white and sometimes <strong>iframes can be the best solution</strong> for a problem (you could substitute &#8220;&#8216;iframes&#8221; with &#8220;Flash&#8221; in the previous 2 sentences, but <a title="&quot;flash isn't evil, but ...&quot; on blog.futtta.be" href="http://blog.futtta.be/2010/01/20/flash-isnt-evil-but/">that&#8217;s another discussion</a>). So here are <strong>5 quick tips which might lessen some of the SEO- and usability-problems</strong> associated with the use of iframes;</p>
<h3>1. Google <span style="text-decoration: line-through;">loves</span> doesn&#8217;t hate iframes done right!</h3>
<p>Although <a title="frames on google webmaster central faq" href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=34445">Google is rather vague about the subject</a>, iframes and SEO do not have to be mutually exclusive. But you will have to make sure it&#8217;s your <strong>main page that shines in search results</strong>, not the iframe-content. The main page (where the iframes are defined) has to be more then a mere placeholder for one or more iframes. Migrate as much information (titles, description and other text) from the iframe-content to <strong>your main page, which should describe what goes on in the iframe(s)</strong>. Use the <strong>iframe title</strong>-property and insert <strong>alternative content</strong> between opening and closing iframe-tags. A quick example:</p>
<blockquote><p>&lt;h2&gt;Calculate your mortgage rate&lt;/h2&gt;<br />
&lt;p&gt;Calculating your mortgage rate was never easier; just enter the loan-amount and the duration below!&lt;/p&gt;<br />
&lt;iframe src=&#8221;http://page.url/iframe-container-page1&#8243; &#8230;  title=&#8221;Calculate your mortgage rate here&#8221;&gt;Your browser does not seem to handle frames properly, but you can calculate your mortgage rate &lt;a href=&#8221;http://page.url/iframe-container-page1&#8243;&gt;here&lt;/a&gt;&lt;/iframe&gt;</p></blockquote>
<h3>2. Own the stage</h3>
<p>Avoid visitors viewing the <strong>iframe-content out of the context</strong> of the main page (e.g. because they followed a link in search-results). Add <strong>javascript</strong> to the iframe-content to check if it is accessed stand-alone and <strong>redirect to the main page</strong> (or explain and provide link to the main page) if that is the case.</p>
<blockquote><p><code>if(self.location==top.location) top.location.replace('http://contain.er/page-url/here');</code></p></blockquote>
<h3>3. Don&#8217;t draw blanks</h3>
<p>When a visitor clicks a link at the bottom of a <strong>long page inside an iframe</strong> and the target is a <strong>shorter page</strong> inside the same iframe, then he/she will <strong>see a blank page</strong> which is &#8230; well not very usable, no? The (hackety-hack) solution; tell the browser to scroll to the top of the iframe each time a new page in it is loaded, by calling the function below (with the iframe id as parameter) when the iframe&#8217;s onLoad event fires:</p>
<blockquote><p>&lt;script&gt;<br />
var firstrun = new Object();<br />
function frameMagic(el) {<br />
if (typeof firstrun[el] === &#8216;undefined&#8217;) { firstrun[el]=true; }<br />
else { document.getElementById(el).<a title="great javascript method on elements, more info on quirksmode.org" href="http://www.quirksmode.org/dom/w3c_cssom.html#t23">scrollIntoView()</a>; }<br />
}<br />
&lt;/script&gt;<br />
&lt;iframe id=&#8221;iframe&#8221; onLoad=&#8221;frameMagic(&#8216;iframe&#8217;);&#8221;&gt;</p></blockquote>
<p>Update: the above code has been updated heavily, check <a title="frameMagic.js standalone javascript to handle &quot;blank&quot; 2nd pages in an iframe" href="http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/">my frameMagic.js blogpost</a></p>
<h3>4. Your users really do need scrolling=&#8221;auto&#8221;!</h3>
<p>Help your visitors access all iframe content no matter what configuration they&#8217;re using: <strong>don&#8217;t disable the iframe scrollbars</strong>! Disabling them will render the iframe partially inaccessible for some of your users, because the size your iframe-content needs depends on things outside your control such as operating system &amp; versions (e.g. font &amp; screen resolution), browser (e.g.  css-implementation) and browser configuration (e.g. non-default font-size). Instead define a reasonable iframe-width and height, make the <strong>iframe-content width flexible</strong> (fluid) and <strong>let the browser decide</strong> if a <strong>vertical scrollbar</strong> is needed.</p>
<p>Update: <a title="squeezeFrame.js on this blog" href="http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/">squeezeFrame.js</a> might be a solution to your scrollbar-woos</p>
<h3>5. Smart sizing without scrollbars</h3>
<p>If you really really really don&#8217;t want scrollbars, if you want your iframe to adapt to the size needed by the iframe-content automatically and if you&#8217;re not afraid to experiment; there are some nifty javascript-solutions that allow the iframe-content to communicate the required height to the main page. Check out <a href="http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx">Framemanager</a> (stand-alone, <a href="http://benalman.com/projects/jquery-postmessage-plugin/">has some issues</a> though) and the <a href="http://benalman.com/projects/jquery-postmessage-plugin/">JQuery-postmessage</a> <a href="http://benalman.com/code/projects/jquery-postmessage/examples/iframe/">iframe-example</a> (which does everything in javascript, which isn&#8217;t really ideal from an accessibility point of view).</p>
<p>Conclusion: iframes aren&#8217;t necessarily evil (<a title="just to be clear; flash isn't evil, but ... really." href="http://blog.futtta.be/2010/01/20/flash-isnt-evil-but/">either</a>), but you&#8217;ll have to make a small effort to render them somewhat SEO- and user-friendly.</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2010/03/09/fix-iframe-positioning-problem-with-framemagic-js/' rel='bookmark' title='Permanent Link: Fix iframe-positioning problem with frameMagic.js'>Fix iframe-positioning problem with frameMagic.js</a></li>
<li><a href='http://blog.futtta.be/2010/03/24/avoid-iframe-scrollbars-with-squeezeframe-js/' rel='bookmark' title='Permanent Link: Avoid iframe-scrollbars with squeezeFrame.js'>Avoid iframe-scrollbars with squeezeFrame.js</a></li>
<li><a href='http://blog.futtta.be/2010/02/04/embedding-youtube-html5-video-with-newtube/' rel='bookmark' title='Permanent Link: Embedding YouTube HTML5-video with newTube'>Embedding YouTube HTML5-video with newTube</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/03/03/5-tips-to-tackle-the-problem-with-iframes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>(Not) Obsessing over the iPhone</title>
		<link>http://blog.futtta.be/2010/02/11/not-obsessing-over-the-iphone/</link>
		<comments>http://blog.futtta.be/2010/02/11/not-obsessing-over-the-iphone/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 11:58:12 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobiready]]></category>
		<category><![CDATA[ppk]]></category>
		<category><![CDATA[quirksblog]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress mobile pack]]></category>
		<category><![CDATA[wptouch]]></category>

		<guid isPermaLink="false">http://blog.futtta.be/?p=2778</guid>
		<description><![CDATA[PPK of Quirksmode-fame it at it again, this time badmouthing iPhone-centric web development. A lot of people seem to take issue with his point of view, but aside from the (typically Dutch?) in-your-face bluntness, I do think he makes some very valid points. The web is about broad accessibility, about allowing as many people as [...]]]></description>
			<content:encoded><![CDATA[<p><a title="about peter-paul koch" href="http://www.quirksmode.org/about/">PPK</a> of <a href="http://www.quirksmode.org">Quirksmode</a>-fame it at it again, this time <a href="http://www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html">badmouthing iPhone-centric web development</a>. A lot of people seem to take issue with his point of view, but aside from the (typically Dutch?) in-your-face bluntness, I do think he makes some very valid points. The web is about broad accessibility, about allowing as many people as possible to access your information/ application and the same should indeed be the case for mobile web development.</p>
<p>Sexy as a iPhone-UI mimicking webapp (based on e.g. <a title="iui on google code" href="http://code.google.com/p/iui/">iUI</a> or <a title="jqtouch website" href="http://jqtouch.com/">JQTouch</a>) might seem, it does have a number of important shortcomings:</p>
<ul>
<li>it is sub-optimal for the web, even on iPhones, as the context is very different (e.g. in terms of responsiveness)</li>
<li>the iPhone-UI-approach does not make a lot of sense on non-iPhone high-end touch devices</li>
<li>it will probably not work on mid- and lower-end phones at all</li>
</ul>
<p>So yes, web-developers should try to build mobile sites that render on as many devices/ browsers possible, as we do on the non-mobile web. Unless you&#8217;re willing to invest in several sites for different  handsets, building for one specific device is a bad choice, however good the browser might be (and Safari Mobile indeed is great).</p>
<p><a href="http://ready.mobi/results.jsp?uri=http%3A%2F%2Fblog.futtta.be&amp;locale=en_EN"><img class="size-full wp-image-2784 alignright" title="this blog is mobi(le) ready" src="http://blog.futtta.be/wp-content/uploads/2010/02/ready_mobi.png" alt="" width="381" height="122" /></a>That&#8217;s why I decided to switch from the iPhone-centric <a href="http://www.bravenewcode.com/products/wptouch/">WPTouch</a> (which <a title="3 months of wptouch (blogpost about installing wptouch on blog.futtta.be)" href="http://blog.futtta.be/2009/10/22/blog-futtta-be-going-mobile-with-wptouch/">I installed only 3 months ago</a>) to &#8220;<a href="http://www.assembla.com/spaces/wordpress-mobile-pack">WordPress Mobile Pack</a>&#8221; for this blog. WMP offers great mobile functionality out of the box;</p>
<blockquote><p>It includes a mobile switcher to <strong>select themes based on the type of user  that is visiting the site</strong>, a selection of mobile themes, extra widgets, <strong> device adaptation</strong> and a <strong>mobile administration panel</strong> to allow users to  edit the site or write new posts when out and about.</p></blockquote>
<p>When running the <a href="http://ready.mobi/results.jsp?uri=http%3A%2F%2Fblog.futtta.be&amp;locale=en_EN">MobiReady</a> test to assess how &#8220;mobile-ready&#8221; my blog is, I get a great score of 4.35/5 (page size being the main remaining issue). So thanks for ranting PPK!</p>


<p>Possibly related twitterless twaddle:<ul><li><a href='http://blog.futtta.be/2009/02/03/new-powerful-iphone-with-flash-preinstalled-in-q4/' rel='bookmark' title='Permanent Link: New powerful iPhone with Flash preinstalled in q4?'>New powerful iPhone with Flash preinstalled in q4?</a></li>
<li><a href='http://blog.futtta.be/2008/10/29/my-mobile-bookmarks/' rel='bookmark' title='Permanent Link: My Mobile bookmarks'>My Mobile bookmarks</a></li>
<li><a href='http://blog.futtta.be/2009/02/17/jakob-nielsen-on-mobile-web-usability/' rel='bookmark' title='Permanent Link: Jakob Nielsen on mobile web usability'>Jakob Nielsen on mobile web usability</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://blog.futtta.be/2010/02/11/not-obsessing-over-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
