AJAX + Browser Persistence
Hi All,
I'm building an external Wi-Fi adapter that features an embedded web server. jQuery and Ajax are used on the client to configure the adapter.
A configuration action that can be triggered via jQuery/Ajax is for the adapter to scan for wireless access points. In order to initiate a scan, the adapter changes Wi-Fi mode (AP to Station), does the scan, and then returns to the Wi-Fi mode that it was in (Station to AP). The changing of the Wi-Fi mode causes the connection between the adapter and the client running the browser to be temporarily broken. Once the connection is re-established (~15 seconds), the browser returns to normal; however, the Ajax process that initiated the wireless scan is left hanging and has to be manually aborted -- it never receives the scan info from the server.
I assume the temporary loss of connection between the adapter and the client causes the Ajax process to hang, though I am still debugging and investigating alternatives.
Given the scenario above, are there options that would enable Ajax to re-connect/maintain the connection to the adapter, or is there a different approach that should be considered?
I appreciate any help that y'all can provide.
Cheers,
-John