If youre running a mobile web app on your phone and you suddenly walk into wifi range (or out of it) the app becomes unresponsive. No error message or disconnect message is displayed, it just stops working.
You can easily duplicate this by starting your app on wifi and then turning wifi off, the app will happily sit there as a cell data connection is opened, and you can see the spinner showing its trying to send data when you click on something, but nothing will ever happen.
Would it be possible to reconnect to the session when you connect from the same device via a different interface? The cookies and other data that identify the connection should still be valid. Perhaps this is overzealous security? Or perhaps it just wasnt something anyone though would happen.
Thats part of the fun of being on a mobile connection, your IP is going to change periodically I believe it should be able to follow me across changes given other information in the conversation. At the very least it should give me an error message instead of just sitting there not doing anything?
Seems to me your issue is not quite different. Using the setTimeOut/Pushback method, your app could display a msgbox when connection is lost, instead of being stuck.
If an application could display a wait message when it loses the network (rather than close / crash) and if it could stay connected when changing network (change wifi network, failover on mobile network…), it would be a big improvement. We live in a mobile world today! So in a world where there may be temporary disconnections, failover between network (wifi / mobile network …), etc.
Just tried this again by going to my load balanced app while in my Wi-Fi network and when turning Wi-Fi off I’m still in the app without loosing the connection
I did not quite get what you explained in the other thread. Typically, you are on Wifi , disconnect from it, then reconnect minutes later through cellular data or from another wifi network, and with different IP, and the session has been maintained alive by the proxy ?
If I’m on a Wifi network and loose the connection to said network, I’m still connected to the app over a 4G connection(or what ever) instead.
You cannot close the browser and open it at a later time to be reconnected and resume were you left off. That does not work.
Don’t know for how long the connection will be kept alive but that might be a setting in the proxy config.
[quote=179660:@Albin Kiland]If I’m on a Wifi network and loose the connection to said network, I’m still connected to the app over a 4G connection(or what ever) instead.
You cannot close the browser and open it at a later time to be reconnected and resume were you left off. That does not work.
Don’t know for how long the connection will be kept alive but that might be a setting in the proxy config.[/quote]
The Web app only loads on wifi/ethernet connection…refuses to load on 4g or 3g?
Is there a solution for this? Oddly, one wifi connection I tried was slower than the 4G connection, yet somehow the app knows the difference between data and wifi? I thought initially the problem was speed, but this is surely not the case.
works fine on my Nexus 5 with the wifi turned off. It does take a while to connect and once connected, the login dialog is off the screen, but it is possible to scroll laterally to reach it.
Yes, using a reverse proxy or load balancer will effectively bypass the mechanism that is built into the web framework for managing individual sessions. It also means that you’ll likely not be able to have multiple sessions open on the same browser/device at the same time.
Yepp. A quick look at the session cookie with multiple windows open in the same browser and they are equal.
Any way to prevent that maybe? Or is that something I would have to configure in HAProxy somehow…?
[quote=195718:@Albin Kiland]Yepp. A quick look at the session cookie with multiple windows open in the same browser and they are equal.
Any way to prevent that maybe? Or is that something I would have to configure in HAProxy somehow…?[/quote]
Once you do that, then you have the wifi vs cellular problem again.
Time to update this thread because of the addition of WiFi Assist to the latest iOS update. That new feature makes iOS web apps extremely unreliable and frustrating to use.
What WiFi assist does is time the latency of opening a connection over wifi. If youre at the edge of the range or if the wifi is just really hung up with lots of traffic and your connection isnt quickly acked it will attempt to make the same connection over the cell radio. Whichever socket actually opens first it will use that one.
This means that people connecting to your apps now may be doing so from 2 different IP addresses. Not just at a wifi switchover as before, but randomly back and forth many times. The connection from one will work, the other will do nothing and display no error message.
With that new feature it has become somewhat of a priority for me to bug folks about this again. If your wifi is at all dodgy then about half your clicks will never register on the server and half the server updates will never make it to your app. We need a session that can survive on multiple IP addresses now. Its no longer sensible to consider a change of IP to be a security problem.