Making email addresses safe from bots on a webpage?

前端 未结 22 1915
不知归路
不知归路 2020-12-02 08:09

When placing email addresses on a webpage do you place them as text like this:

joe.somebody@company.com

or use a clever trick to try and fo

22条回答
  •  情书的邮戳
    2020-12-02 08:39

    I've written an encoder (source) that uses all kinds of parsing tricks that I could think of (different kinds of HTML entities, URL encoding, comments, multiline attributes, soft hyphens, non-obvious structure of mailto: URL, etc)

    It doesn't stop all harvesters, but OTOH it's completely standards-compliant and transparent to the users.

    Another IMHO good approach (which you can use in addition to tricky encoding) is along lines of:

    
    

提交回复
热议问题