Skip to main content

Gumby2 Backbone IE8 Web App Fixes

By Sam Deering

JavaScript

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

In this post i’ll list any fixes which may help you if your using Gumby2 framework with Backbone. I’ll add more as I find them…

Override a button click in IE8

if (Gumby.isOldie) {
    var referLink = document.createElement('a');
    referLink.className = "skiplink";
    referLink.href = "#entry";
    document.body.appendChild(referLink);
    referLink.click();
}
else
{
    window.location.href = "#entry";
}

Hard page refresh for IE8

//hard refresh for IE8
if (Gumby.isOldie && document.referrer == "")
{
    window.location = '/#register';
}

In your backbone router:

Backbone.history.start({ pushState: Modernizr.history, silent: true });
if(!Modernizr.history) {
    var rootLength = Backbone.history.options.root.length;
    var fragment = window.location.pathname.substr(rootLength);
    Backbone.history.navigate(fragment, { trigger: true });
} else {
    Backbone.history.loadUrl(Backbone.history.getFragment())
}

Sam Deering has 15+ years of programming and website development experience. He was a website consultant at Console, ABC News, Flight Centre, Sapient Nitro, and the QLD Government and runs a tech blog with over 1 million views per month. Currently, Sam is the Founder of Crypto News, Australia.

New books out now!

Learn valuable skills with a practical introduction to Python programming!


Give yourself more options and write higher quality CSS with CSS Optimization Basics.