var html5history = !!(history.pushState && history.state !== undefined); html5 = false; if(html5history) html5 = true;