why use defer:

If post the same url, will throw 302 error,
then redirect to postpage, before the error to be showned, the error are
already be set true.

so we need to defer the seting true process.

Therefore, if the redirect finishes, the error are still false, so it
can be showed, and then the error will be clear