@public #ipad #iphone #ios #safari #reload #backstep #backbutton

Forces a Page reload on mobile Safari if User is going back in browser history

/*! Reloads on every visit in mobile safari */
if ((/iphone|ipod|ipad/gi).test(navigator.appVersion)) {
    window.onpageshow = function(evt) {
        if (evt.persisted) {
            document.body.style.display = "none";
            location.reload();
        }
    };
}
/** Big Thanks to http://stackoverflow.com/questions/24046/the-safari-back-button-problem **/

Remove disabled select options on iOS devices from DOM to handle mobile safari issues with disabled select options

if(navigator.userAgent.match(/(iPad|iPhone|iPod touch)/i) 
   && !navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS 7_\d/i)){
     $('select.your_special_class option[disabled]').remove();
}

@public #iphone #ipad #js #javasript #target #userAgent #match

Auf diese Weise lassen sich granulare Browserversionen unterscheiden und differenzierte Javasript Aufrufe ausführen.

Projects

Tags

Capsule Servers

Lost connection to server.