...most definately takes an argument (Boolean), ensures - and seems to work, generally - that reload is not from cache
[color=blue]location.replace([i]url[/i]);[/color]
...changes location, without adding item to browsing history
[color=blue]location = [i]url[/i];[/color]
...'href' property optional; because of its importance, the [b]Location[/b] object - btw it's [b]window[/b].location (not document) - can be written to directly.
@David_HarrisonAug 26.2004 — #[i]Originally posted by nitwit [/i]
[B]ensures that reload is not from cache[/b][/quote]I did not know that.
[i]Originally posted by nitwit [/i]
[B]changes location, without adding item to browsing history[/b][/quote]It does add the item to the history, but it replaces the current page in the history. In other words, the back button will not take you back to the page that the location.replace was on, but instead the one before it.
[i]Originally posted by nitwit [/i]
[B]'href' property optional[/B][/QUOTE]Web-sites "work" without a DOCTYPE but a DOCTYPE is still mandatory, the same thing goes here.
@nitwitAug 26.2004 — #Good call on .replace(), I was typing & eating at the same time, bad idea...?
Web-sites "work" without a DOCTYPE but a DOCTYPE is still mandatory, the same thing goes here.[/QUOTE] Wrong, the Location object is [i]designed[/i] to take a (string) url...according to David Flanagan of O'Reilly 'rhino' book fame, this is the preferred technique. Neither is 'mandatory', however.