I'm trying to redirect to a new URL using window.location.href which does not seem to work for a particular URL.
The page URL is: http://localhost:37368/Office/Search/c2VhcmNoaWRzPTEyMiwxMjIsMTI0LDE1OCwzNzl8bG9jYXRpb25pZHM9MSwyfGZyb21pZHM9fHRvaWRzPQ==
Upon a button click, something happens using an AJAX post, and the URL is changed, via JavaScript, to http://localhost:37368/Office/
However, the page always redirects back to the previous one.
The JS code:
onClear: function (event) {
//.... omited for purpose of question
var $controller = (event.data.object.settings.controller === undefined) ? '' : event.data.object.settings.controller
$new_url = window.location.protocol + '//' + window.location.host + '/' + $controller;
window.sessionStorage.clear();
window.location.href = $new_url;
}