I have coded a php webpage. There is a while loop in the page which retrieves data from database and do certain logic with data and update the same data in database. This loop takes more than 4 minutes to complete this whole processing of loop. and then the remaining page code is processed.
Now at some time while the page is loading for while loop process and it is not completed yet, If I press Esc button, which means, I force stop the page from more processing. Now if I suddenly refresh the page , It takes very long to load any page on this same website. I assume that the remaining part of the loop is in progress of completion when I refresh the page suddenly.
I want this page to reload the page normally and doesn't depend upon the previously stopped action.
Is there any solution to this problem in your mind ? I also tried it via Ajax, but same problem persists.