Home > Software engineering >  What are the differences between sending a redirect on the client side and one on the server side?
What are the differences between sending a redirect on the client side and one on the server side?

Time:09-12

I was recently reviewing this post, and that post generated a doubt. What is the difference between sending a redirect as shown below versus sending a server side redirect?

<meta http-equiv="refresh" content=1; url="/example">

Is it the same to make a redirect using the html code shown above as using any programming language? When should I use each one? Thank you in advance :D.

CodePudding user response:

The HTTP Location header and 3xx responses are supported by more clients, and allow you to give more information about the nature of the redirect (permanent/temporary), why the redirect happened (moved document, or 'see other').

The only case where you'll want to use the HTML meta tag is if the HTTP redirect can't be used.

  • Related