it looks like setting hash to an empty string cause the page to reload in FF, I have not tested it in other browsers
On Thu, May 21, 2009 at 9:30 PM, rpflo <[email protected]> wrote: > > I'm having a little trouble understanding ... > > "the content changes but the page doesnt reloads so the adrees in the > bar remains www.server.com/home. > > I want that when the user reloads the page it goes to > www.server.com/contact > and not www.server.com/home." > > When you say "reloads" in the second paragraph do you mean the ajax > request or they actually hit refresh/reload? > > If you mean the ajax request (and not an actual reload), you can't > change the text in the address bar with javascript. So as the user > clicks the address bar will always read www.server.com/home. > > If you want that to change as they click you could use > www.server.com/#contact > (as mentioned by Sandy). > > If you want the user to be able to type in www.server.com/contact you > could use a combination htaccess and php to load the proper content. > > > > On May 21, 2:10 pm, Sanford Whiteman <[email protected]> > wrote: > > > I want that when the user reloads the page it goes > towww.server.com/contact > > > and notwww.server.com/home. > > > > You cannot change the hostname or path that "would be" reloaded > > without actually reloading the document. In other words, you cannot > > rewrite the main content of the location bar/textbox without the > > browser also going to that location. > > > > The exception is the # hash. Changing the hash will not reload from > > scratch. But your URLs are not currently constructed to use the hash > > to determine the inner content. If you change this structure, it will > > work. > > > > --Sandy > -- fax : (+33) 08 26 51 94 51
