Im using the following script to add in startup screens for my mobile website, once its been added to the home screen.
<script>
(function(){
var a;
if(navigator.platform === "iPad") {
a = window.orientation!==90||window.orientation === -90 ?
"/assets/img/startup/startup-tablet-landscape.png" :
"/assets/img/startup/startup-tablet-portrait.png";
}
else {
a = window.devicePixelRatio === 2 ?
"/assets/img/startup/startup-retina.png" :
"/assets/img/startup/startup.png";
}
document.write('<link rel="apple-touch-startup-image" href="' + a + '"/>');
})();
</script>
This works for iPhone but not for iPad, I’m testing on the new iPad, does this matter? All I get is a white screen before it loads.
You don’t need javascript for that, you could use this snipplet and it should pick the right image automatically:
Source: https://gist.github.com/1375646