<?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>Johan Mulder dot com &#187; offline</title>
	<atom:link href="https://johanmulder.com/?feed=rss2&#038;tag=offline" rel="self" type="application/rss+xml" />
	<link>https://johanmulder.com</link>
	<description>Blogging about IT and stuff</description>
	<lastBuildDate>Mon, 19 Jan 2015 15:45:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Solving the &#8216;QUOTA_EXCEEDED_ERR&#8217; message when using local storage on Motorola RhoElements browsers</title>
		<link>https://johanmulder.com/?p=39</link>
		<comments>https://johanmulder.com/?p=39#comments</comments>
		<pubDate>Thu, 27 Nov 2014 13:57:05 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[localStorage]]></category>
		<category><![CDATA[offline]]></category>

		<guid isPermaLink="false">http://johanmulder.com/?p=39</guid>
		<description><![CDATA[Working with JavaScript exceptions can be quirky as descriptions of these exceptions sometimes does not make any sense. In this particular case I was working on a Motorola device lately which was running the RhoElements 4.x web browser. The Motorola RhoElements browser is part of the RhoMobile Suite of Motorola, which allows web developers to &#8230; <a href="https://johanmulder.com/?p=39" class="more-link">Continue reading <span class="screen-reader-text">Solving the &#8216;QUOTA_EXCEEDED_ERR&#8217; message when using local storage on Motorola RhoElements browsers</span></a>]]></description>
				<content:encoded><![CDATA[<p>Working with JavaScript exceptions can be quirky as descriptions of these exceptions sometimes does not make any sense. In this particular case I was working on a Motorola device lately which was running the RhoElements 4.x web browser. The Motorola RhoElements browser is part of the RhoMobile Suite of Motorola, which allows web developers to have a closer hardware integration with Motorola devices.</p>
<p>A strange bug popped up however while I was trying to use local storage to store offline data. The QUOTA_EXCEEDED_ERR exception pops up when I try to store local data. This error is known tot pop up when you use <a href="http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an" target="_blank">Mobile Safari in Private Browsing Mode</a> but I&#8217;m not using Mobile Safari obviously. This is the code snippet I used to set data into local storage:</p>
<pre class="brush:javascript" style="font-size: 0.8em">
set: function (name, value) {
    try {
        localStorage.setItem(name, value);
    } catch (e) {
        if (e == QUOTA_EXCEEDED_ERR) {
            alert('Quota exceeded!');
        }
    }
}
</pre>
<p>Browsing the Motorola forums finally led to a <a href="https://motorola-dev.hosted.jivesoftware.com/thread/4106" target="_blank">discussion mentioning both this erratic behavior as well as the solution</a>. I was in fact using a dash (&#8216;-&#8216;) in my host name which leads to this strange behavior. It has been promised by a Motorola service desk employee to be solved in 4.2. Currently I&#8217;m working on 4.0 so unfortunately I can&#8217;t check this. Nevertheless, I&#8217;m using the IP address instead of the FQHN for now to bypass this issue.</p>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
