I am running a webapp that is displayed just after a user successfully logged on a wifi network using a captive portal.
On iOS, after the user logs in, my webapp is displayed in the CNA (Captive Network Assistant) popup and the top right button label is turned to "Ok" to allow the user to close this popup.
I want to have a specific behavior in my webapp when it is displayed inside this CNA popup, so I am trying to detect (with Javascript) if my webapp is displayed in such a popup.
I first bet on the window.innerHeight value but on my iPhone 5 it seems difficult :
- 460px height inside Safari
- 440px height inside Safari during shared connection or telephone call
- 459px height inside Captive Network Assistant
- 439px height inside Captive Network Assistant during shared connection or telephone call
1px difference is, in my point of view, not enough to figure out if I am in this CNA popup.
Is there any other javascript information I can rely on to determine if I am in such a popup ?
Thank you