Does post redirection - do I need to arise for an ajax request?

Is there any reason to use post-redirect-get (prg) for the request, which, as you know, will happen only through the ajax request?

in this case, you may have a request that is sent (via ajax or direct), and we assume that in focus we can distinguish what is. In the case where a direct request is processed using prg, is there any reason to also process an ajax request using prg?

or maybe the answer to the ajax message directly?

+4
source share
1 answer

For what uses only AJAX, I see no reason to use prg. Since this is not a user-controlled action with the possibility of duplication, the only way the AJAX call will be duplicated is if the original page has been refreshed before the action completes, and since prg has the same drawback, you can also use direct an approach.

+4
source

All Articles