set window.location but WITHOUT a reload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bernhard

    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
  • Lee

    #2
    Re: set window.location but WITHOUT a reload

    Bernhard said:[color=blue]
    >
    >Hi,
    >
    >does any of you know a way how to set window.location without
    >automaticall y 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?[/color]

    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.co m", 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?

    Comment

    • Bernhard

      #3
      Re: set window.location but WITHOUT a reload

      Lee wrote:
      [color=blue]
      > 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.co m", 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?
      >[/color]

      Good point. Havn't thought about that possibility.

      I have read the following article and i like the idea.
      A growing debate pits accessibility against usability. From our point of view, it’s like pitting peanut butter against jelly. This article helps you create a page that is both usable and acce…


      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.

      Comment

      • Fred Oz

        #4
        Re: set window.location but WITHOUT a reload

        Bernhard wrote:
        [...][color=blue]
        > 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.[/color]

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

        Incidentally, document.locati on 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

        Comment

        Working...