javascriptiosiphonesafarimobile-safari

Open a link using JavaScript in iOS safari URL bar


I am attempting to open a link using the iOS safari address/URL bar.

From my testing, the address bar does not execute javascript:alert("hi"); as it did in previous iOS versions.

Is there a new way of going about this, or was it completely deprecated?


Solution

  • It seems I have found your answer, window.open("https://www.google.com") for example works in the safari iOS URL bar, while javascript:alert("hi") does not.