tobami/codespeed — Issue #105: Use History API instead of explicit permalink button
Author: squiddy
Created: 2011-12-18 11:30:34+00:00
State: open

**Disclaimer**: I haven't checked yet whether jQuery Address also provides this feature.

Right now, the jQuery Address plugin is used to update the URL when the permalink is clicked. IMO this has some disadvantages:

* change of URL triggers a (unnecessary) page reload
* hashtag urls (as seen in the timeline view)

The History API allows to modify the browsing history, e.g. pushing new pages are replacing the current one. Some advantages:

* no page reload
* no (ugly) hashtag URLs

Using the API for codespeed we can:

* Remove the permalink button (the URL will be updated on every single change)
* Users can copy the URL anytime and get the same view again

**Problems**

Of course, browser support: http://caniuse.com/#search=history

Apparently no current version of IE supports the API. But it might be possible to fallback on the old behaviour, that is showing a permalink button for IE users.

**Demo**

https://github.com/squiddy/codespeed/tree/history_demo
Look at the comparison view and you'll (hopefully) see what I'm aiming for.

http://html5demos.com/history/