0

I'm starting to learn web-programming. I've read about the difference between forward and redirect. But two questions not fully understood still:

  1. In which case does the process access to a server-side and in which case without server-side?
  2. When does URL change and when doesn't change? Does URL changes always when redirecting? Does URL changes never when forwarding?

I would be very grateful for the clear answers and explanations! Thanks in advance!

  • 3
    Please don't abuse the tags. Your question has nothing to do with C#, PHP or Java. I fixed them. – Daniel Hilgarth Jan 11 '13 at 11:22
  • possible duplicate of [difference between jsp forward and redirect](http://stackoverflow.com/questions/6068891/difference-between-jsp-forward-and-redirect) – Paolo Moretti Jan 11 '13 at 11:24

2 Answers2

0

They are not hard and fast terms.

A redirect usually means an HTTP redirect, which is an HTTP response that instructs the client to make a new HTTP request to a different URI.

An internal redirect is a common description of a redirect that is handled internally by the webserver / web application / etc and doesn't send the browser to a different URI.

Forward is not a particularly common term, but when I've encountered it it usually means a form of internal redirect.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

Forward happens on serverside, server forwards the same request to another resource. whereas redirect happens on the browser side, server sends http status code 302 to browser so browser makes new request.

Redirect requires one more round trip from browser to server.

One more difference is redirect reflects in browser address bar forward doesnt.

laxonline
  • 2,657
  • 1
  • 20
  • 37