In this tutorial, I show how you can enable CSRF protection and regenerate hash for next AJAX request and pass hash in AJAX request in the CodeIgniter 3.