Created
June 18, 2013 16:46
-
-
Save dylanhthomas/5807093 to your computer and use it in GitHub Desktop.
iPad Conditional Viewport - Serve different viewports to different clients based on user-agent. With php this is a trivial affair, as long as you know the user-agents that your targeting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Probably an iPad | |
if(stristr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { | |
echo '<meta name="viewport" content="width=980;user-scalable=yes;" />'; | |
} | |
else{ | |
echo '<meta name="viewport" content="width=1150;user-scalable=yes;" />'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment