title: Best practices for client side vs. server side redirects: When to use what?
body: <p>I understand that most of the languages support server side redirects <code>(asp.net: Response.Redirect, PHP: header( 'newpage' ) ; )</code>. You could also do a redirect with JavaScript <code>(window.location.href="newLocationURL")</code>.</p>
  
  <p>When would you choose one over the other ?</p>
  
  <p>With respect to ASP.net/IIS7(app pool in Integrated mode,enable 32 bit apps=false), I noticed that even when the page has a 302 header, the whole page body is sent to the client side. </p>
  
  <p>And <a href="http://www.satya-weblog.com/2009/10/php-redirect-vs-javascript-redirect.html" rel="noreferrer">I believe this is not the case with PHP</a>, only headers are sent ? To quote
  Redirect on client side means following steps:Client-side -> Server-side -> Client-side -> Server-side -> Client-side.</p>
  
  <p>Redirect on Server-Side means:Client-side -> Server-side -> Client-side (headers only)* -> Server-side -> Client-side.</p>
  
  <p>Is there a W3C standard  or  server side redirect implementation differ from one web server technology to another ?</p>
  
  <p>Edit: I am only concerned about Response.Redirect (in asp.net) and not server.transfer, at least for this discussion</p>