On most modern browsers, I'm able to use:
history.pushState({}, 'Our Work','/url/path/');
Obviously IE doesn't support this, but I'm wondering why my simple hack doesn't work?
history = {
pushState : function(state,title,url) {
window.location = url;
}
};
I've also tried:
window.history = {
pushState : function(state,title,url) {
window.location = url;
}
};
But I get a 'member not found' attribute.
Is this even possible with IE8?
I really didn't want to include a whole library for this simple hack, it's weird though because adding:
if (!window.console) {
console = {
log: function() {},
error: function() {}
};
}
Fixes my console logs...
Any help would be great!