Show progress for long-running iterative PHP script using AJAX


life after Flex

In a current project, I’ve got a php script that takes a CSV file of student ID’s uploaded in an AJAX operation which is checked against an Active Directory server as a sort of integration/data integrity check. Each check takes a couple of seconds, which is fine if the number of entries is low, but there’s sometimes up to 200 entries. At even 3 seconds per entry processed, it takes about 10 minutes.

Now, I’ve blocked access to the upload page while this is happening, with a ‘Please Wait’ message- sort of like a modal loader widget. The catch is, that a process taking 10 minutes might cause the end user to feel that the app is borked, and they’ll try the upload again. Do this enough times, and the server starts to sloooowww…

What we need is some feedback to the uploading page, to reassure the end…

View original post 477 more words