Generally we use ‘path’ in web or in file system, to aim a target where we want to navigate.
The format, sometimes is confusing, when we are using changeable base_url.
For example, when this jekyll blog runs in local, the base_url is localhost, while it is riino.site now.
In other cases, the situation might be more complex. For example, in dev env, the base_url is example.com, while in prod env, it become example.com/welcome!
When we handle this, the final method is
Of course, we can also use other ‘location’ to navigate from different source:
self.location.href;//Current pagewindow.location.href;//Current pagethis.location.href;//Current pagelocation.href;// Current pageparent.location.href;//Parent pagetop.location.href;//Top page