Should mailto be used in HTML5?

前端 未结 4 1620
后悔当初
后悔当初 2021-01-07 23:40

A year or so ago I decided to stop using the mailto tag because many times it is annoying to the user. It will bring up an email program that the user may not be using at th

4条回答
  •  星月不相逢
    2021-01-07 23:56

    I usually see companies using a server-processed contact form instead of publishing email addresses. Most web geeks I know tend to use some sort of JavaScript obfuscation to write out their email addresses, which will admittedly leave non-JS browsers/users in the dust. A compromise would be to use images. (Yuck.)

    To get to the heart of your question, I absolutely use mailto: all the time where appropriate. It is a meaningful way to convey to a browser what to do with a link. Users are free to configure what email client to open these links in using the relevant browser and/or OS options.

提交回复
热议问题