By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,044 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,044 IT Pros & Developers. It's quick & easy.

set window.location but WITHOUT a reload

P: n/a
Hi,

does any of you know a way how to set window.location without
automatically reloading the page?
I heard of one, but for this i must alter the configuration of the browser!
I suspect that its not possible. How else could i alter the url of the
current page?

Greetings
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Lee
Bernhard said:

Hi,

does any of you know a way how to set window.location without
automatically reloading the page?
I heard of one, but for this i must alter the configuration of the browser!
I suspect that its not possible. How else could i alter the url of the
current page?


Since "alter the url" is synonymous with "reload the page", it's not clear what
you're asking for. Do you mean, for example, that you want the URL displayed on
the page to read "http://www.citibank.com", while the actual page is coming from
a server running on your PC in Korea? Are you sure you would be willing to use
a browser configured to allow that?

Jul 23 '05 #2

P: n/a
Lee wrote:
Since "alter the url" is synonymous with "reload the page", it's not clear what
you're asking for. Do you mean, for example, that you want the URL displayed on
the page to read "http://www.citibank.com", while the actual page is coming from
a server running on your PC in Korea? Are you sure you would be willing to use
a browser configured to allow that?


Good point. Havn't thought about that possibility.

I have read the following article and i like the idea.
http://www.alistapart.com/articles/eatcake/

But i wanted to extend the script, so that you can specify the div you
want to show then the page is loaded (already done), and also to be able
to bookmark the different divs.
But to bookmark them i must have something like the following in the
url: http://url.tld?div=intro
And to achieve this i must alter window.location every time a new div is
shown. But if everytime i alter url the page is reloaded the whole
purpose of the srcipt is defeated.

It was a nice idea. But its an security nightmare.

Jul 23 '05 #3

P: n/a
Bernhard wrote:
[...]
But i wanted to extend the script, so that you can specify the div you
want to show then the page is loaded (already done), and also to be able
to bookmark the different divs.
But to bookmark them i must have something like the following in the
url: http://url.tld?div=intro
And to achieve this i must alter window.location every time a new div is
shown. But if everytime i alter url the page is reloaded the whole
purpose of the srcipt is defeated.


Have you tried using anchors? Requires no JavaScript and can be
bookmarked.

Incidentally, document.location is specified as the URI of the
currently displayed document. As far as I can discover, there is
nothing that explicitly says you must reload the page when changing the
location, however it is implied by the above specification.

--
Fred
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.