I have a page that contains some JS to update the browser history (pushState(), using HTML5). As IE8 does not support HTML5 users are being told that the page contains an error. While this doesn't deminish the functionality of the page, it doesn't look very professional, so I'm wondering if there is a check to see if the users browser supports HTML5 before running this code?
<script type="text/javascript">
/** Update history.state() (for back/forward links) */
var object = {
ajax_string: '<?php echo make_ajax_string(); ?>',
security: '<?php echo wp_create_nonce('updated-page-nonce'); ?>',
};
window.history.replaceState(object, '<?php echo $post->post_title; ?>', '<?php echo get_permalink($post->ID); ?>');
</script>
Thanks.