Hi pplz, how automatically bookmarks will be updated and point to new location by using permanent redirect using http headers i have tried and not found any changes in bookmarks using the following code res.setStatus(301); // SC_MOVED_PERMANENTLY res.setHeader("Location","NewServletUrl"); Any comments : ?
I do not believe that you should see a change in the client side bookmarks. The browser would have to accept the response and act on it to make the change. Your servlet should not be able to change files on the client without some user action. Even if the browser were built to accept the status and allow changes to the bookmarks, it should (IMHO) still prompt the user before making such a change. HTH, Joe
Joined: Jan 20, 2002
Thanks Joe , so what is the difference between in Permanent Redirect and Temporary Direct . as i read in Book Inside Servlets by Dustin R.Callaway on page # 234 its written on 4 para that " '301 Move Permanently' status Code , the browser should update any bookmarks pointing to the old location." Any Idea regarding this?
Hi - Callaway's book does indeed say that. Here's where it comes from: The HTTP/1.1 specs are at www.w3.org. The section on 301 responses says (in part): "Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible." Whether that actually happens is going to be very browser and browser-option dependent. HTH, Guy [ January 22, 2002: Message edited by: Guy Allard ]