views:

631

answers:

2

Is there a better way to keep the domain name unaltered in the adress bar besides using a main frame?

+2  A: 

You can use AJAX to change the content of the page without changing the address.

However, if the data is located on another domain then the address should change to point to that domain. Also, it is recommended that the address can be bookmarked so user's can easily return to the data. The address should reflect the content of the resource it points to.

JarrettV
You didn't use the name, but in the last part of your comments, you are speaking of RESTful concepts - have a URL always point to a page in a given state and have the state of the page reflected in the URL are part of REST.
Jason Bunting
+3  A: 

Using a frame (or some other inner window, via Flash or Silverlight, etc.) really is the only way to do it - if you try to modify the main window's location with JavaScript, it will change the page's location to the URL you specify, so that will not really work either.

You should be mindful of RESTful principles - what is the intent for not allowing the URL in the address bar to reflect the true location of the user within the domain?

Jason Bunting
Yeah, I know I shouldn't do it, but the client just won't agree with me, so...Thanks a lot, anyway
Gabe