I am trying to mimic the functionality from http://asidemag.com/ - it seems they show a page on the web and another on the iPad that indicates the user to add to the home screen in order to view the magazine.
I was just wondering how have they made it so when you launch from the homescreen it doesn't just load the same page as before (telling them to add to home screen)?
Is this something server side? I am at an intermediate PHP level.
You might also try this script: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
You can easily include the script at the top of your page like so:
<?php
include('browser.php');
$browser = new Browser();
$whatbrowser = $browser->getBrowser();
$whatversion = $browser->getVersion();
if($whatbrowser == 'iPad' || $whatbrowser == 'iPod' || $whatbrowser == 'iPhone'){
echo 'This is an IOS device';
}
else{
echo 'This is NOT an IOS device.';
}
?>
This script will tell you what type of browser your user is using and can even tell you what version. Great for warning users that their Internet Explorer version 6 might not display everything properly.
Good luck!
I have used and found this little script rather good.
http://cubiq.org/add-to-home-screen
It will correctly identify which iOS device is being used, and position a notification in the correct spot with the correct icon informing the user how to add this web app to the home screen.
It is also customisable so you can make it behave / look however you want.
精彩评论