<?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>Softcore software development &#187; browser compatibility</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/browser-compatibility/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google Maps and geolocation</title>
		<link>http://tea.cesaroliveira.net/archives/61</link>
		<comments>http://tea.cesaroliveira.net/archives/61#comments</comments>
		<pubDate>Fri, 10 Jul 2009 05:37:34 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[browser compatibility]]></category>
		<category><![CDATA[google chrome]]></category>

		<guid isPermaLink="false">http://tea.cesaroliveira.net/?p=61</guid>
		<description><![CDATA[I was first made aware of the fact that maps.google.com now uses geolocation by sdwilsh, which is new in Firefox 3.5. But when I loaded maps, I was surprised to see that it didn&#8217;t work when I visited the site. And I was using something even more recent than Firefox 3.5, Minefield. Surely, it has [...]]]></description>
			<content:encoded><![CDATA[<p>I was first made aware of the fact that <a href="http://maps.google.com" onclick="pageTracker._trackPageview('/outgoing/maps.google.com?referer=');">maps.google.com</a> now uses <a href="https://developer.mozilla.org/En/Using_geolocation" onclick="pageTracker._trackPageview('/outgoing/developer.mozilla.org/En/Using_geolocation?referer=');">geolocation</a> by <a href="http://twitter.com/sdwilsh/status/2553543365" onclick="pageTracker._trackPageview('/outgoing/twitter.com/sdwilsh/status/2553543365?referer=');">sdwilsh</a>, which is new in <a href="http://www.spreadfirefox.com" onclick="pageTracker._trackPageview('/outgoing/www.spreadfirefox.com?referer=');">Firefox 3.5</a>. But when I loaded maps, I was surprised to see that it didn&#8217;t work when I visited the site. And I was using something even more recent than Firefox 3.5, Minefield. Surely, it has geolocation, so what is going on?</p>
<p>The reason maps doesn&#8217;t support Minefield is because of  *<a href="http://www.youtube.com/watch?v=NNaZedAWmlE" onclick="pageTracker._trackPageview('/outgoing/www.youtube.com/watch?v=NNaZedAWmlE&amp;referer=');">drumrolls</a>* &#8230; browser sniffing. Developers&#8230; no wait&#8230; GOOGLE web developers, I thought we moved on?</p>
<p>The actual bit of code is here unminimized and tidied up ;<br />
<code>
<pre>
function isBrowserGeolocationSupported(){
    if (window.navigator &#038;&#038;
        navigator.userAgent.search("Firefox") != -1 &#038;&#038;
        navigator.geolocation)
        return true;
    if (window.navigator &#038;&#038;
        navigator.userAgent.search("Chrome") != -1)
        return Number(String(/Chrome\/[0-9]+/.exec(navigator.userAgent)).substr(7))>=2;
    var gearsFactory=null;
</pre>
<p></code></p>
<p>The hell? Ok, so I understand they do a bit of browser sniffing because it looks like Chrome had a old/broken implementation of geolocation. But I wish there was a more graceful way of doing this (maybe something like navigator.geolocation.version < 1). One that didn't break every application that may implement geolocation that isn't named Firefox. Because, those <a href="http://flock.com/" onclick="pageTracker._trackPageview('/outgoing/flock.com/?referer=');">exist</a> <a href="http://www.getsongbird.com/" onclick="pageTracker._trackPageview('/outgoing/www.getsongbird.com/?referer=');">too</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/61/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross browser tidbits</title>
		<link>http://tea.cesaroliveira.net/archives/50</link>
		<comments>http://tea.cesaroliveira.net/archives/50#comments</comments>
		<pubDate>Thu, 01 Jan 2009 21:25:05 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[browser compatibility]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=49</guid>
		<description><![CDATA[for each&#8230;in doesn&#8217;t work in Opera/IE/Safari. So avoid it when creating web pages and use for loops instead. In fact, you shouldn&#8217;t even be using it in arrays. oops. (Javascript is special in this way) While location is defined by most browsers, most let you redefine it in a local scope. Not Opera $(&#8216;&#60;a&#62;&#8217;) may [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/for_each...in" onclick="pageTracker._trackPageview('/outgoing/developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/for_each...in?referer=');">for each&#8230;in</a> doesn&#8217;t work in Opera/IE/Safari. So avoid it when creating web pages and use for loops instead. In fact, you shouldn&#8217;t even be using it in arrays. oops. (Javascript is special in this way)</li>
<li>While location is defined by most browsers, most let you redefine it in a local scope. Not Opera</li>
<li>$(&#8216;&lt;a&gt;&#8217;) may look correct in jQuery, but it will not work properly in IE. You must close the element tag. So it is $(&#8216;&lt;a /&gt;&#8217;)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/50/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

