web pages jump method
- Forwarding (forward)
- Redirect (redirect)
Forwarding render
The default server is the way forward jump
Forwarding features:
- Address bar address will not change
- A request
- You can carry data into the template
- Only forwards inside the server
Redirect redirect
Redirection features:
- The address bar will change
- 2 Request
- You can not carry the data to the Template
- Redirection can be redirected to an external request (e.g., Baidu)
2 redirector send request:
When a user sends a request to the background processing data, the background do use the redirect page jump if any;
then the server will respond with a special header information, including a Content-length = 0, Location and 302 status code;
then the browser receives this special header information, automatically obtains a value corresponding to Location, and automatically sending a second request