Welcome Guest, Not a member yet? Register   Sign In
Using flush in controller, return echo before running script
#2

[eluser]CroNiX[/eluser]
You should use the output class instead of echoing from your controllers. It's what it's for.

But, the better solution to your problem is to hand that request off to an outside, asynchronous process, so your user will see the message immediately and the processing gets done in the background.

This can be as simple as using a socket call to send the data to a different controller or method and not waiting for the response.

We use this all of the time for handing off data to an external CRM, which takes time to process, after a user fills out a form and it works great. The end user shouldn't have to wait for processing.

Here is an (CI) example: http://blog.markturansky.com/archives/205


Messages In This Thread
Using flush in controller, return echo before running script - by El Forum - 10-08-2013, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB