Please explain the difference between forward and redirect?
- Different definitions
redirect (indirect forwarding mode): actually two requests, the server in response to the first request, let the browser again another URL request, so as to achieve the purpose of forwarding
forward (direct forwarding request): Client / browser request sent only once, there is a second resource response to the request information, the request in the request object, for each object stored information resources are shared
- Different requestor
- redirect client-initiated requests
- forward server-initiated request
- Browser performance is not the same address
redirect: the browser displays the requested address url
Forward: does not display the browser address requested url
- Unlike parameter passing
- redirect: restart a Request, ending the life cycle of the original Request
- forward: forward other times a connection, request variables is in its life cycle, another page can also be used, in essence, is not it include the destination address
- Underlying the operation of different
- redirect: There are requesting information sent to the client, so the client is forwarded to another resource, it is necessary between the server and the client in a communication to increase
- forward: direct server side to find the target, and include over