I'm developing web application in javascript/html5/css that have different layouts in fullscreen and browsermode. Is there any method to termin if user switches between fullscreen and browser mode on iOS6.
Asked
Active
Viewed 210 times
0
-
1iOS 6 is still under NDA and according to the agreement of the Beta you are not allowed to talk about iOS 6 other then the Apple Developer Forum. – rckoenes Aug 15 '12 at 14:16
-
I'm no expert but I think you can achieve it by detecting screen resolution. Refer to this: http://stackoverflow.com/questions/1587499/detecting-browser-client-area-size-on-wide-screen-using-javascript – Aniruddh Aug 15 '12 at 14:16
2 Answers
0
var isOpenFromHomeScreen = navigator.standalone; //true false

Bo Persson
- 90,663
- 31
- 146
- 203

alQemist
- 362
- 4
- 13
0
you could build a function in php
something like:
$user_agent = $_SERVER['HTTP_USER_AGENT'];
function getBrowser() {
global $user_agent;
$browser = "Unknown Browser";
$browser_array = array(
'/msie/i' => 'Internet Explorer', //Old version from IE
'/Trident/i' => 'Internet Explorer', //New version from IE
'/firefox/i' => 'Firefox',
'/safari/i' => 'Safari',
'/chrome/i' => 'Chrome',
'/opera/i' => 'Opera',
'/netscape/i' => 'Netscape',
'/maxthon/i' => 'Maxthon',
'/konqueror/i' => 'Konqueror',
'/mobile/i' => 'Handheld Browser'
);
foreach ($browser_array as $regex => $value) {
if (preg_match($regex, $user_agent)) {
$browser = $value;
}
}
return $browser;
}
Then you could do what you want with it, like: echo getBrowser();
or depending on the answer change the css.

VMeijer
- 415
- 1
- 5
- 15