Avoid URL updates when clicking a telephone (tel) link

UPDATE: Since writing the below, I have found that some browser (InTune on Android for example) still updates the address. So I’m still looking for a solution to this.

Some mobile browsers either open up a new blank page, or updates the address bar URL when a telephone link is clicked.

This can be avoided by adding a target to the link that points to a hidden iframe. As in the following example.

<a href="tel:12345678" target="hidden-iframe">Call us</a>
<iframe name="hidden-iframe" style="visibility:hidden;position:absolute;"></iframe>

That’s all.

Do you know of other ways to achieve this? Then please let me know, thanks 🙂

Leave a Reply

  • Your email address will not be published.
  • Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: