I’m trying to use this script that will redirect any webpage to another webpage with a query including the previous webpage’s URL.
The code I’m attempting to use looks as such:
window.location = "http://www.readability.com/m?url=" + document.URL;
It’s not working though, for what reason I can’t figure out. I’m not to familiar with encoding, so this may be the problem. As this works…
window.location = "http://www.readability.com"
But this does not work
window.location = "http://www.readability.com/"
Furthmore I’m working with a mobile browser, not anything like chrome. So it may just be an issue with that, but it may not be. Thanks for reading, and thanks in advance for any help.
You need to escape the URL, otherwise it will be cut on the first
&it contains.also ignore
document.URLand use a more common and interoperablewindow.locationinstead.