set window.location but WITHOUT a reload

B

Bernhard

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
 
L

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?
 
B

Bernhard

Lee said:
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.
 
F

Fred Oz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top