<?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>dev.enekoalonso.com &#187; history</title>
	<atom:link href="http://dev.enekoalonso.com/tag/history/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.enekoalonso.com</link>
	<description>having fun with code</description>
	<lastBuildDate>Wed, 12 Oct 2011 21:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>location.hash is dead (on html5 browsers)</title>
		<link>http://dev.enekoalonso.com/2011/05/18/location-hash-is-dead-on-html5-browsers/</link>
		<comments>http://dev.enekoalonso.com/2011/05/18/location-hash-is-dead-on-html5-browsers/#comments</comments>
		<pubDate>Wed, 18 May 2011 21:49:51 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[manipulate]]></category>
		<category><![CDATA[mdc]]></category>
		<category><![CDATA[pjax]]></category>
		<category><![CDATA[pushState]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=696</guid>
		<description><![CDATA[Pretty cool technique to actually change the url of the page (something until now impossible to do in Javascript for security reasons): http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate Also good to read, the browser history MDC documentation: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history And finally, pjax, a new script that combines the use oj Ajax calls and this technique to manipulate the url to achieve [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty cool technique to actually change the url of the page (something until now impossible to do in Javascript for security reasons):<br />
<a href="http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate">http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate</a></p>
<p>Also good to read, the browser history MDC documentation:<br />
<a href="https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history">https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history</a></p>
<p>And finally, pjax, a new script that combines the use oj Ajax calls and this technique to manipulate the url to achieve a beautiful ajax navigation experience, with permalinks and without the need of using location.hash.<br />
<a href="http://pjax.heroku.com/">http://pjax.heroku.com/</a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>December 29, 2008 -- <a href="http://dev.enekoalonso.com/2008/12/29/modifying-the-url-hash-without-affecting-the-browser-history/" title="Modifying the URL Hash without affecting the browser history">Modifying the URL Hash without affecting the browser history</a> (0)</li><li>May 12, 2011 -- <a href="http://dev.enekoalonso.com/2011/05/12/angry-birds-as-a-web-app/" title="Angry Birds as a Web App">Angry Birds as a Web App</a> (0)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>August 27, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/27/link-whirlpool-js/" title="Link: Whirlpool JS">Link: Whirlpool JS</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2011/05/18/location-hash-is-dead-on-html5-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying the URL Hash without affecting the browser history</title>
		<link>http://dev.enekoalonso.com/2008/12/29/modifying-the-url-hash-without-affecting-the-browser-history/</link>
		<comments>http://dev.enekoalonso.com/2008/12/29/modifying-the-url-hash-without-affecting-the-browser-history/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 23:51:15 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[modify]]></category>
		<category><![CDATA[replace]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=223</guid>
		<description><![CDATA[Although this is not very common, some times you would like to modify the URL hash (this is the value after the # on the URL) without affecting the browser history. Let&#8217;s say you have multiple sets of tabs on your page or simply that your hash is going to change very often. But still [...]]]></description>
			<content:encoded><![CDATA[<p>Although this is not very common, some times you would like to modify the URL hash (this is the value after the # on the URL) without affecting the browser history. Let&#8217;s say you have multiple sets of tabs on your page or simply that your hash is going to change very often. But still want the user to be able to grab a permanent link to that page configuration.</p>
<p>The trick is to use the replace function, instead of directly assigning the value.</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// Direct assignment will add a new step to the history on browsers like Firefox 3</span></div>
</li>
<li class="li1">
<div class="de1">window.<span class="me1">location</span>.<span class="me1">hash</span> = newHash;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Using the replace function changes the hash without affecting the browser history.</span></div>
</li>
<li class="li1">
<div class="de1">window.<span class="me1">location</span>.<span class="me1">replace</span><span class="br0">&#40;</span>window.<span class="me1">location</span>.<span class="me1">href</span>.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&#39;#&#39;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span> + <span class="st0">&#39;#&#39;</span> +newHash<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Nice.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 18, 2011 -- <a href="http://dev.enekoalonso.com/2011/05/18/location-hash-is-dead-on-html5-browsers/" title="location.hash is dead (on html5 browsers)">location.hash is dead (on html5 browsers)</a> (0)</li><li>August 27, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/27/link-whirlpool-js/" title="Link: Whirlpool JS">Link: Whirlpool JS</a> (0)</li><li>October 12, 2011 -- <a href="http://dev.enekoalonso.com/2011/10/12/command-line-scripting-with-node-js/" title="Command line scripting with Node.js">Command line scripting with Node.js</a> (0)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/29/modifying-the-url-hash-without-affecting-the-browser-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

