Don Smith
Senior Program Manager
Microsoft patterns & practices
Use arrow keys to navigate and Ctrl/Cmd -/+ to adjust text and positioning
Project Silk
Client-side Web
Development for
Modern Browsers
$('#AboutLink').click(function() {
history.pushState(
{foo: 'bar'}, // state object
'About Us', // title (ignored)
'#about' // new URL
); // also changes address bar
});
$(window).bind('popstate', function(e) {
// address bar has already changed
var state = e.state;
});
var state = $.bbq.getState() || {};
state.foo = 'bar;
$.bbq.setState(state, 2);
mstats.dataStore = {
_data = {},
get: function(token),
set: function(token, payload),
clear: function(token),
clearAll: function()
};
mstats.dataManager = {
dataDefaults = {
dataType: 'json',
type: 'POST' },
sendRequest: function(options),
resetData: function(endpoint),
};
window.localStorage.setItem('foo', 'foo data');
var foo = localStorage.getItem('foo');
localStorage.removeItem('foo');
$(window).bind('storage', function(e) {
var key = e.key,
url = e.url,
oldValue = e.oldValue,
newValue = e.newValue;
});
This presentation is online @
http://locksmithdon.net/talks/html5spi.html