mobile - Conditional Viewport - Serve different viewports to different clients
I had a situation where I needed to serve different viewports to different mobile devices.
A little php makes this a trivial affair, as long as you know the user-agents that your targeting.
<?php
if(stristr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
//Probably an iPad
echo '<meta name="viewport" content="width=980;user-scalable=yes;" />';
}
else{
echo '<meta name="viewport" content="width=1150;user-scalable=yes;" />';
}
?>