Welcome Guest, Not a member yet? Register   Sign In
Ajax controller responding slow
#1

I am experiencing that controller endpoint handling Ajax requests are responding very slow...
I've though mittigated this exit() just after handling the response to the client requesting the endpoint.

Code:
$this->output
                            ->set_content_type('application/json')
                            ->set_status_header(201);
                        echo json_encode(array(
                            'status' => 1,
                            'message' => 'ok',
                            'image' => $post['id'],
                            'jury_id' => $this->jury_id,
                        ),JSON_UNESCAPED_SLASHES);
                        exit();

If I don't do the exit() in the controller function, it seems that too much is taking place in the post processing functions.
Any better way to approach this?

I am still on CI3!!

Geir
Reply


Messages In This Thread
Ajax controller responding slow - by geirarnesen - 07-08-2024, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB