I want to conditionally load the meta viewport tag, but can’t figure out how to do this (easily*).
I’m using a bootstrap based responsive design, but there is no ‘middle’ size, just desktop and mobile, so iPads and other small screens (greater than 480px) get the standard desktop view.
The viewport meta tag is required for the mobile layout, but I would like to remove this if the screen size is greater than 480px, because I would like the iPad and other tablet devices to automatically resize the desktop site to fit, as they do without the viewport tag.
Essentially I’m trying to do this:
Which would work perfectly in the body area, but not in the head area of the html.