M
M
Michael2016-08-16 14:54:26
JavaScript
Michael, 2016-08-16 14:54:26

Redirect not working properly in IE(EDGE)?

There is a url like domain/path/login.html
After clicking the login button, getting data and writing it to localStorage, the following happens:

backPage = localStorage.backPage
delete localStorage.backPage
window.location.href = "##{backPage or ""}"

In all browsers login.html is replaced with # or #name, in EDGE the pound sign is simply appended to login.html. Tried the same through location.replace does not help. Who faced it? Write a crutch or is there a more elegant way?
UPD: I understand everything, I have a
<base href="./">
base on the page in the head and everywhere it works fine when you change location.href everywhere except edge. What to do with it is not yet clear

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question