Response.Redirect vs Server.Transfer
Membangun aplikasi berbasis web saat ini telah semakin populer. Banyak pula basasa pemrograman yang digunakan dan salah satu yang banyak digunakan adalah ASP.NET yang merupakan produk dari Microsoft.
Pada posting kali ini akan kita lihat beberapa perbedaan antara Response.Redirect vs Server.Transfer
Perbedaan tersebut bia kita lihat dari tabel dibawah ini :
Server.Transfer(Path, Parameter)
|
Response.Redirect(Path, Parameter)
|
|
Redirection
|
Redirection is done by
the server.
|
Redirection is done by
the browser client.
|
Browser URL
|
Does not change. (user
wouldn't know page name, hard to debug).
|
Changes to the
redirected target page. (user would know page name, easy to debug).
|
When to Use
|
Redirect between pages
of the same server (for performance).
|
Redirect between pages
on different server and domain.
|
Parameter True
|
Pass querystring and data (forms collection) to next page
|
Client is redirected
to a new page but the processing of the current page is aborted.
|
Parameter False
|
Clear querystring and data (forms collection) to next page
|
Client is redirected
to a new page and the current page on the server will keep processing ahead
|
Response
| Complete in 3 steps |
Semoga posting tentang "Response.Redirect vs Server.Transfer" diatas dapat bermanfaat.
Salam,