How to find if a browser supports History.Pushstate or not?

Viewed 23581

I want to change URL without without reloading the page. The possible solution I found is

window.history.pushState('page2', 'Title', '/page2.php');

but some browser like Firefox 3.5, IE6+ does not support this, so for them solution is

var uri = window.location.href;

but the issue is how to discover if a browser supports history.pushstate or not?

Is TRY CATCH is the possible solution or any thing else.

1 Answers
Related