I have a registration form with hidden token input. There is also username field & whenever user input any data to username field , it sends ajax request to server & checks if username already exists. So the ajax request is sent multiple times.
I know how to update token, my question is there any need to update token for this simple request?is it worth updating token for every ajax request?
Thanks
It depends on the framework you are using. If the framework expires the token after some time then you will have to update the token.
You can update the token after some time before it gets expired.
And if the token does not get expired then there is no need to update the token.