This issue is hard to explain, so I'm going to do my best.
I have this webapp which was built on Laravel with a jQuery frontend. I know it's kind of legacy, and plans are to rebuild the frontend to React, but this is what is is for now.
The case is as follows:
- jQuery opens up a screen and does an XHR request for a HTML-table
- Initially this goes well
- I change my filters and reload the table
- I can see the request being made in the network tab, but it keeps pending
- After a few seconds I see a response size of a few Kb, but no status
- The browser hangs until you force-close the browser
The request that was made does the following on the server-side:
- Initiate an object's query
- Apply filters from the query-vars
- Fetch and put them in a Collection (default Laravel
get()
->method)
- Loop them in a blade-file to a
<table>...</table>
Additional info:
- There are no errors on the client or the server side
- This happens only on iPad's, on several browsers (Safari / Chrome / Firefox) and only on this screen (this app consists of 100's of screens built the same way)
- The expected behaviour is that after a while the request gives you a 200 and a response size. This only gives a response size, without any status - so it's still waiting for something
- When I open the URL in a separate tab on my iPad, after force-quitting the browser, it works. Within a second I have the data on my screen
- I've tried using fetch instead of XHR, but no luck
- Problem is not bound to a single device, it's appearing on several real iPads and can be reproduced on a simulator
- Laravel v8.0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…