window.location.href does not work on Windows Phone

Asked

Viewed 202 times

1

I have an application made in Cordova that uses window.location.href to transfer two values between pages. Everything works fine on Android, iOS and even IE, but when I test directly on Windows Phone, it says it can’t find the page.

Can you help me? Has anyone ever had the same problem?

My code is here:

window.location.href = nome + ".html" + '?sessao=' + encodeURIComponent(sessao) + "/" + encodeURIComponent(telefone);

1 answer

0

This will not be the best way to transpose values from page to page. I suggest you take a look at Html5 especially in window.localStorage.setItem('key', 'label') and then to take the value do window.localStorage.getItem('key')

  • Yeah, I know you don’t. The problem is that I tried to use localStorage just like sessionStorage and none of it works in Safari, and I wanted an option that worked equally for the three operating systems.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.