Solution
var url = 'http://...'; window.location.replace(url);
Example
window.location.replace('http://example.org');
var url = 'http://...'; window.location.replace(url);
window.location.replace('http://example.org');