Search code examples
javascriptandroidjqueryandroid-wificaptiveportal

Jquery page not working on android captive portal sign in browser


I have a captive portal system for which I have built a login page. The page is built in html5 and jquery. It is a single file, multi-page jquery setup and it works perfectly fine in a normal browser(chrome, firefox etc). Android normally detects that the device is connected to a captive portal wifi and shows the "Sign into Wi-Fi network" notification and if you touch that then it loads the login page in its own sort of browser (web viewer?) and here my login page isn't working.

The main page shows but all other pages are showing just blank. And even though the main page shows, clicking the buttons also does nothing. My initial thoughts were that either javascript or ajax were disabled in this "browser" but then the main page is built with javascript after being fetched via ajax from the server and it wouldn't have been shown if either javascript execution or ajax calls weren't working.

So, I have no idea how to go about troubleshooting this issue. Can anyone help?


Solution

  • The problem was that I had used HTML5's localStorage somewhere in the code and evidently that "sign into WiFi" browser thing does not support local storage. I have now switched to cookies and everything is working as it should in the "browser". I hope this saves someone else the more than two days I wasted on this...