I have a script that takes an uploaded text file, parses it and then inserts quite a bit of rows into a database. This process takes about a minute.
Even though I am using AJAX I don't want my users to have to see Loading... for upwards of a minute while the database is being populated. Actually, as soon as the parsing completes successfully, the database INSERTS will always work because everything is validated during parsing.
So what I need to do is return a JSON string {success:true,data:{cartons: 1000, batchname:"Batch1"}}
as soon as the parsing is successful. I do this, but the browser doesn't parse the response until the connection is closed (script is through running) Is there anyway to get the browser to accept the response as it comes in or for me to close the connection with the browser while my PHP script continues to run?
I am using ExtJS as the Javascript framework that is handling the AJAX. Any ideas? This has been racking my brain for about a week.