I use location.relaod()
to reload the current page (from the cache or not). This reloads the page as it - with all GET
parameters in the URL.
If the current page is https://www.example.com/somewhere/page.html?a=3&b=4
, is it possible to trigger the reload of https://www.example.com/somewhere/page.html
?
The current solution I plan to use is to
var fullURL = "https://www.example.com/somewhere/page.html?a=3&b=4"
var splitURL = fullURL.split('?')[0]
document.write(splitURL)
but maybe a more Javascripthic way is already implemented?
Javascriphic was borrowed from from Python -> Pythonic