Use the location.reload() function to reload the current page. It does the same as the browser's reload button.
It accepts an optional parameter that defaults to false. The value false reloads the page from the browser's cache. If you set it to true, it forces the page's reload from the server.
An equivalent to location.reload() is: history.go(0)
The HTML 5 spec at w3.org/TR/html5/browsers.html#dom-history-go tells us that they are equivalent: "When the go(delta) method is invoked, if the argument to the method was omitted or has the value zero, the user agent must act as if the location.reload() method was called instead. Otherwise, the user agent must traverse the history by a delta whose value is the value of the method's argument." -- Qusay Mohammed, Sep 03, 2016