About the Apple Captive Network Assistant
If you’re a mac user, you likely have seen a strange popup window appear on your computer when you try to connect to the internet at a hotel, coffee shop or airport. It looks like this:

This popup is a utility built in to Mac OS called the Captive Network Assistant (CNA). The idea was to make it easier for users to authenticate on visitor-based WiFi networks that require some form of authentication (usually initiated from a web form) to get online.
They are referred to as “captive” networks as the user is held captive - unable to browse the web freely - until they accept the terms and conditions, purchase access, etc.
How it works
To check if the user is on a captive network, a “probe” process runs immediately after the user associates with the WiFi SSID. On macOS 10.12.1, a request is made to following URL:
http://captive.apple.com/hotspot-detect.html
If the source of the page is simply the text Success, the process assumes the user is on a normal network and does not display a popup. If, however, the URL does not return the success message due to forced captive portal redirection, the CNA popup is trigged and the captive portal page is displayed in the popup.
Limitations
On macOS 10.12.1, the CNA popup is a hardcoded browser window that has limited browser functionality. It displays a browser window that is 900px wide by 572px tall. It has other limitations that are important to be aware of:
- It cannot save cookies
- It cannot launch new tabs or other browser windows
- It cannot display
window.alert()orwindow.confirm()javascript popups - It cannot be resized
It's now supporting window.alert() and window.confirm() on iOS 11.2.2, but no cookies yet
CNA Preview Tool
I created a really simple preview tool for previewing how pages look inside the CNA popup. You check it out here. Keep in mind that preview pages must allow themselves to be iframed.
Captive Network Assistant in Safari does not support Session Storage
I am building an Angular 2 application. The application is bootstrapped when a user joins the wifi network and they are redirected to the application which is rendered in a Captive Portal. The application works in all the other browsers with the exception of Safari for OS X.
I cannot debug this but from researching the behavior of OS X it seems that the Captive Portal Assistant launches some limited browser which does not support Session Storage.
This is breaking my application because when the appellation is bootstrapped it needs to store flags in Session storage before it redirects the user to the login page. Those flags are what the login page uses to determine if the user entered the application via the wifi redirect or the application url.
How do I get around this problem? I have researched and have not found any solution to my problem. Our application basically works from the point of a user attempting to access the private wifi network and this needs to work on a Mac.
window.sessionStorage availability and fall back to cookies if it's unavailable.About the Apple Captive Network Assistant的更多相关文章
- Network Assistant (Alpha)版使用说明
Network Assistant (网络助手)使用说明 本软件是一款帮助同学方便Ip更改,小蝴蝶断线重连,一键wifi,定时关机的软件.它集成 ...
- 我了解到的新知识之—Apple Captive Portal 网页认证登陆公共Wifi
因为今天一个用户遇到选择公司WiFi后,无法弹出网页认证登陆界面的问题,随即上网搜索相关信息,因为公司内没有VPN,无法FQ,只能用bing来搜索一下相关信息了. Captive Portal听起来好 ...
- 无线热点登陆认证原理探究---captive portal
什么是Captive Portal 大家肯定都连过公共场所的wifi热点,比如麦当劳等地方的.他们的wifi往往一连上去就会弹出一个要求登录或者微信关注之类的页面,只有在这个页面完成操作了才能正常访问 ...
- 无线热点登陆认证原理探究---captive portal 什么是Captive Portal
什么是Captive Portal 大家肯定都连过公共场所的wifi热点,比如麦当劳等地方的.他们的wifi往往一连上去就会弹出一个要求登录或者微信关注之类的页面,只有在这个页面完成操作了才能正常访问 ...
- 苹果手机连接Wifi认证机制
Wifi状态保持方法和nas设备 https://patents.google.com/patent/CN106793171A/zh 基于ios终端的离线wifi热点认证方法和认证系统 https:/ ...
- 手机连接wifi自动弹窗的原理及其实现方案
一.手机连上wifi后会自动弹窗的原理 生活中,有很多需要认证的路由器,手机连接wifi热点后会自动弹出一个网页,让用户输入账号和密码,比如星巴克,肯地基,麦当劳,甚至是火车站和机场的候车室.其实这是 ...
- 个人整理的一些iOS Entitlements
收集了不少Entitlement,当然也肯定有遗漏.有的就是key的字面意思,就不多做解释.不过有的虽然字面意思好理解,不过具体的用处不太清楚,就写的Unknown use.在替换entitlemen ...
- 获取wifi热点
https://stackoverflow.com/questions/31555640/how-to-get-wifi-ssid-in-ios9-after-captivenetwork-is-de ...
- Arduino Nano + WIZ550io = 简易上网
我爱Arduino Nano – 这是一个非常好外形小巧却功能齐全的Arduino Uno.然而.当我去将它连接到互联网,全部的干净利落小巧也消失在大尺寸的以太网盾底下了. 只是,我近期发现了一个更好 ...
随机推荐
- 【linux高级程序设计】(第十五章)UDP网络编程应用 4
socket信号驱动 为了使一个套接字能够使用信号驱动I/O,至少需要以下3步操作. 1.安装SIGIO信号 2.套接字的拥有者设定为当前进程.因为SIGIO信号只会送到socket拥有者进程. 通过 ...
- Delphi栈对象
来自:http://blog.csdn.net/iseekcode/article/details/5158985 ------------------------------------------ ...
- 关于引用iframe的一点小说明
有时候,在web页面中使用iframe,可以解决一些实际问题,比如跨域访问等……这篇文章的关键不是iframe适用于哪些场景?而是iframe间如何进行互通?所谓互通是指: 情况1:在任何一个页面中调 ...
- 牛客网 暑期ACM多校训练营(第二场)I.car-规律思维题
I.car 车只能从一边走到另一边,而且车和车不能相撞,车也不能走到坑里.所以直接找规律,如果没有坑,最多能放多少辆车.就会发现,关于对角线对称的两边只能放一辆车,如果是奇数个的时候,中间的行和中间的 ...
- 消息队列集群kafka安装配置
1. 下载wget http://mirror.rise.ph/apache/kafka/0.11.0.0/kafka_2.12-0.11.0.0.tgz2. 安装tar xf kafka_2.12- ...
- 四. Java继承和多态9. 类与类之间的关系
类与类之间最常见的关系主要有三种:依赖(uses-a).聚合(has-a)和继承(is-a). 下面以在线书店订单系统为例,来详细的讲述这三种关系的概念. 在线书店订单系统的主要功能是:注册用户可以登 ...
- Android kernel Crash后,定位出错点的方法
转载:http://blog.csdn.net/wlwl0071986/article/details/11635749 1. 将/prebuild/gcc/linux-x86/arm/arm-lin ...
- iOS8使用TestFlight进行内部测试功能尝鲜
iOS8发布了有一段时间了,我们的策划很新潮的速度给升级到iOS8了.于是XCode5不支持了,只好从MacOS 10.8升级到10.9,再升级到10.9.5,再下载XCode6安装…… 然后前两天上 ...
- python 验证码识别之pytesser以及image学习记录
一般的步骤就是上面这些,总的来说分为三部分,去除背景,分割字符,识别. 去除背景可以通过灰度化,二值化,去噪,倾斜度校正等(一般来说灰度化和二值化都是需要的,去噪和倾斜度看情况) 安装PIL工具,下载 ...
- 使用websocket进行消息推送服务
Websocket主要做消息推送,简单,轻巧,比comet好用 入门了解:https://www.cnblogs.com/xdp-gacl/p/5193279.html /** * A Web Soc ...