Request Forwarding (forward) and request redirection (redirect) Lite, one can understand

1. From the address bar displays for
forward server resource requests, the server URL to directly access the target address, the URL of the response content to read over, and then re-distributed to the content browser. Browser did not know sent by the server content came from, so it's address bar or the original address.
redirect server is based on logic, send a status code that tells the browser to re-request the address, so the address bar shows the new URL.

2. From the data sharing for
forward: forward page forward and page to share request to the data inside.
Redirect: can not share data.

3. Using Local is
forward: generally used for user login time, according to the role forwarded to the appropriate module.
Redirect: Generally used to return the main page and jump to other sites when the user logs off landing and so on.

4. From the efficiency for
forward: high.
The redirect: low.

Published 37 original articles · won praise 12 · views 3974

Guess you like

Origin blog.csdn.net/z19950712/article/details/104430996