Home > Java > Javagetting Started > body text

What is the difference between forwarding and redirecting

王林
Release: 2020-11-30 14:19:25
Original
77915 people have browsed it

The difference between forwarding and redirection is: 1. The number of requests is different; 2. The address bar will change when redirecting, but it will not change when forwarding; 3. Redirecting requests twice is not shared. Data, forward a request to share data.

What is the difference between forwarding and redirecting

The differences are as follows:

(Learning video sharing: java video tutorial)

1. Number of requests

Redirection means that the browser sends a request to the server and then sends a request to a new address after receiving the response. Forwarding means that the server jumps to a new address in order to complete the response after receiving the request. Address; Redirect request at least twice, forward request once;

2. Different address bar

The redirected address bar will change, but the forwarded address bar will not change;

3. Whether to share data

Redirect two requests without sharing data, forward one request to share data (information sharing is used at the request level, and an error will occur when using redirection);

4. Jump restrictions

Redirects can jump to any URL, forwarding can only jump to resources of this site;

5. Different behaviors occur

Redirects are client-side Behavior, forwarding is server-side behavior;

Related recommendations:Getting started with java

The above is the detailed content of What is the difference between forwarding and redirecting. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!