Welcome to WebmasterWorld Guest from 54.196.244.206

Forum Moderators: ergophobe

Message Too Old, No Replies

tel: Syntax Question

On PC click brings 404

     
12:35 pm on May 23, 2013 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


Enabling the click to call functions for mobile <a href="tel:555-555-5555"> results in a 404 page when clicked from a PC. Is there something I'm doing wrong or maybe a workaround?

Thanks!
John
7:26 pm on May 23, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12696
votes: 244


Posting this here because it appears to be the Horse's Mouth:

[rfc-editor.org...] (original)
[rfc-editor.org...] (updates)

(Does not answer the question but is a useful link; note in particular that "visual separators" are optional.)

I assume you started out with the same random searches I did, generally leading to the unhelpful suggestion that you might include user-agent detection. Which kinda defeats the purpose of having a phone number in the raw html :(

Does your 404 page act as if you had simply typed in the URL
example.com/tel:555-et cetera?
If so, you should be able to make a rule to intercept requests beginning in "tel" and send them to a custom page. The rule will only be seen by devices that don't recognize "tel"; it won't interfere with telephone users.
9:07 pm on May 23, 2013 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts: 225
votes: 2


Hi Lucy,

Does your 404 page act as if you had simply typed in the URL
example.com/tel:555-et cetera?
>> No, it loads tel:555-et cetera?

"Firefox doesn't know how to open this address, because the protocol (tel) isn't associated with any program."
1:15 am on May 24, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12696
votes: 244


...results in a 404 page when clicked from a PC.
<snip>
"Firefox doesn't know how to open this address, because the protocol (tel) isn't associated with any program."


Now I am confused. Where does the 404 come in?

If the browser steps in before even sending a request to the server, then it isn't your problem. The only way to prevent it is to deploy user-agent detection ahead of time, so the tel: links are only displayed if the user is on the right kind of phone. Or if-- oh, ###, now it gets complicated-- their computer really can make phone calls. (This is a closed book to me, but I have just this moment remembered my father telling me that his computer dials for him. That's a desktop, not mobile-of-any-kind. And no, he's not on a dialup modem connection ;))

You may still be able to treat it as a non-problem if the links are designed so it's very obvious they lead to a phone call, not to another page. Of course there will always be those users who expect their computer to be able to act on all links all the time everywhere...
2:45 am on May 24, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


i agree with lucy24 - that can only be a 404 page if it's a response from the server, meaning the browser is requesting something like http://example.com/tel:555-555-5555.
since it's likely a user-agent based problem, you might consider doing something with user-agent detection in javascript to fix the problem.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members