471,316 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

set window.location but WITHOUT a reload

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
3 5001
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
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
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.

Similar topics

1 post views Thread by Mike Gifford | last post: by
2 posts views Thread by alex bazan | last post: by
19 posts views Thread by Darren | last post: by
7 posts views Thread by Raffi | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.