Atozed Forums
Ajax server error with cell phones - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Ajax server error with cell phones (/thread-1203.html)

Pages: 1 2


Ajax server error with cell phones - bob9999 - 08-22-2019

Hi there.  I have a weird issue that appears to occur when a cell phone has an networking bandwidth issue.  When the phone is on a home wi-fi network with great signal or cell tower all is fine and my application works perfectly.  I managed once to get the ajax server error when I pressed a function before the other request was completed like if the error occurred on the original request.  My client is getting the issue pretty much all the time on the road on his iPhone with Chrome.

In the server controller I have:

AllowMultipleSessionsPerUser = True
AuthBeforeNewSession = false
RestartExpiredSession = false
UseAjaxNotify = true
AjaxErrorMode = emAlert

I can trim my app more so then less bandwidth is required but there is still risk with these mobile devices.  Is there anyway to turn off the ajax errors so then if the user is continuously clicking the old requests just die or if there is an ajax error nothing is displayed to user and all just appears to be slow?

Any other ideas would be appreciated.  

Cheers!


RE: Ajax server error with cell phones - Alexandre Machado - 08-24-2019

Yes, of course you can disable it.

The default behavior is to display error messages to the end user. You can just disable it setting:

ServerController.JavaScriptOptions.AjaxErrorMode := emNone;

This will disable it completely. Or you can even set it to emConsole, which will write the errors to the browser console which is only visible if you explicitly open the developer tools in a desktop browser (F12)

By the way, do you have any timer active on your form posting server requests from time to time?


RE: Ajax server error with cell phones - bob9999 - 08-27-2019

Sorry for the late reply.  I could have sworn I had email notify turned on.  So that is the setting to turn off the errors to the user.  Great!  I will try that.

Yes I have a timer for the main form that is used the most since the save can take some time to parse fields on the screen to send to db.  Is this a problem to have this sort of thing?

More information is that this situation occurs more when a cell phone is on the cell network and wi-fi is way more reliable it seems.

Cheers!


RE: Ajax server error with cell phones - bob9999 - 08-29-2019

I was in my other app and I see no timer and remembered that I removed due to some jq conflict.  I removed the timer from this app and will deploy with the new console setting you have here too.  The key is that all appears to be some sort of timeout with "ajax server not responding" when on a cell phone network.  Cheers!


RE: Ajax server error with cell phones - bob9999 - 09-02-2019

More information is that I removed the timer and the application that used that is just really slow on a cell network.  Since phones are really over-specked now for processing power, is there a way to compress the data stream to the phone and then have the phone uncompress and render the screens?  The first screen I have that loads is just the dashboard with just minimal functions so I cannot see how to from a programming point of view compensate for the phone's issues in networking on a cell network.  I saw a compress option in the server controller so I will see what happens when I experiment with that.  Cheers!


RE: Ajax server error with cell phones - Alexandre Machado - 09-05-2019

All HTML, JavaScript and CSS served by IntraWeb are compressed by default, unless you disabled it.

Check:

ServerController.Compression

Ideally you should have:

AllowDeflate, AllowGZip = True
Enabled = True
Level = 1 (min) to 9 (max)
PreCompress = True
MinSize = 512 (less than that won't make much difference anyway)

You can switch Level to 9 and see if it makes any difference. It will certainly increase the CPU consumption at server side, but if this is not a problem, then you can try it.


RE: Ajax server error with cell phones - bob9999 - 09-07-2019

I changed the compression to 9 but the system is still non-responsive and slow on a cell network.  I am noticing a control is behaving odd from a jq conflict.  Can this cause the issue over a cell network?  I am so perplexed since all is fine when over wi-fi.  What is so different over a cell network or data plan?  Cheers. bob


RE: Ajax server error with cell phones - kudzu - 09-08-2019

Some cellular carriers intercept and even modify the HTML when it goes across their networks. Its a major PITA for software devs.

Which carrier and country are you seeing this on? You can usually bypass this by using HTTPS.


RE: Ajax server error with cell phones - bob9999 - 09-08-2019

The cell phone is an iPhone over a Rogers cell network in BC, Canada.  Interesting idea for SSL.  I will get the client to purchase the URL for this and SSL so then we can flip this over.  The other application I have is totally OK and it is SSL interesting enough.  That is very naughty to strip things from our software rendering.  Thank you for the idea!


RE: Ajax server error with cell phones - kudzu - 09-08-2019

You can use a free SSL cert or even a self signed one to test. For production, a purchased one is best in most cases however.