1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Manipulate address bar via Javascript (Same origin policy)

Discussion in 'General Programming Chat' started by radkappe, Sep 20, 2013.

  1. radkappe

    radkappe Registered Member

    Joined:
    Jul 17, 2010
    Messages:
    59
    Likes Received:
    3
    Hey,

    I am looking for a solution for this for ages now.

    Is it possible to manipulate the address bar via Javascript? I read a lot of the same origin policy and stuff but there must be something I am missing.
    I am asking you guys since there are so many moral officers on other forums and I'm kind of sick of that.

    Any help would be appreciated.

    Cheers
     
  2. FollowTools

    FollowTools Newbie

    Joined:
    Sep 24, 2013
    Messages:
    11
    Likes Received:
    1
    You can only use HTML5 push state to alter the path part of the url or change the window.location.hash.

    Chaning the domain name is not possible and is blocked by web browsers as this poses a major security risk - Imagine people changing the url to: yourbank domain