I developped a website with webapp capability. Is it possible to add some additional content to this webapp ?
I mean : My webapp is basically a html/css/js website adapted to iPhone screen & capabilities. When someone visits this website & click on "add to home screen" button, this website "become" a webapp, with shortcut icon, launchscreen... Etc.
The webapp content is almost the same as my website adapted to iPhone screen & capabilities (+ splashscreen & shortcut icon).
I want to add some more co开发者_C百科ntent in my webapp (than in my website ; but not in my website) : - a string to thanks users who added it to their home screen, - special or additional content in comparison with the common website, Etc.
My question is simple : is it possible ? How can I do the trick ?
Thanks to all,
Nico.
This works a charm...
<script>
if (window.navigator.standalone == true) {
document.write('<p>Welcome Home</p>');
}else{
document.write('<p>Tap the + button and choose "Add to Home Screen"</p>');
document.write('<link rel="apple-touch-icon-precomposed" href="icon@2x.png"/>');
}
</script>
精彩评论