Welcome Guest, Not a member yet? Register   Sign In
action send response immediatelyl then do other task

I would like my controller action to immediately send a 200 response to the user and then do some more activity. This will improve the user experience as the user will not need to wait for longer tasks to complete and I will eventually notify the user the tasks are complete by email.

Is there a particularly CodeIgniter friendly way of doing this?


I presume you're talking about running a long background process, whilst giving the user some indication that this is happening.


I use a fsocket call to a url to trigger a background process, which the user doesn't have to wait for. After filling out a form, they get immediate feedback and can continue on while other things are going on in the background.

Something like this:

Theme © iAndrew 2016 - Forum software by © MyBB