<html>
<head>
<script type="text/javascript">
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) {
window.location = "Default_m.aspx";
}
</script>
</head>
<body>
This is a non mobile page.
</body>
</html>
This script should be inside the head tag for performance. Script will redirect user to mobile page before the body of the page gets rendered.
Friday, November 15, 2013
Detect iPhone through JavaScript
Here is a quick script to redirect iOS (iphone and iPad) users to the mobile page.
Subscribe to:
Post Comments (Atom)
-
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
-
Scenario: Updating the Master Page for SharePoint Online is not recommended by Microsoft now.....fine. So how do we change the UI then? And...
-
Recently my customers was looking for a solution where on-field guys can search for answers related to their tasks and it was a perfect scen...
Official SharePoint Documentation
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
No comments:
Post a Comment