Live data from Hacker News

Protecting your email address via SVG instead of JavaScript

rouninmedia.github.io

81–90 of 180 posts

Re: Protecting your email address via SVG instead of JavaScript

#81
post #2

Email is still plain-text within an xml document referenced in the page source.

Try to query it though via document.querySelectorAll('a') for example. It's a good first line of defense as a lot of scraping techniques do this approach. However, if you have a headless browser setup for scraping, and simply fetch the current URL while on the page[0], you can get the plain text, and do a regex search for email addresses which will get you the email address - albeit this is a strange approach to take…

You can just query for all the image elements and then read any svg using the document model.

This is trivial to overcome for most basic scrapers and not much harder even if you try to obfuscate with paths for more sophisticated ones.

Re: Protecting your email address via SVG instead of JavaScript

#83
post #28
post #26

Earlier quoted context omitted.

[flagged]

It's not a Firefox issue, it's a NoScript issue. Chrome with its market share and propensity to implement its own standards, or Safari with its market share, quirks, and propensity to implement its own standards, make much better candidate IEs.

> Safari with its market share

Safari's market share is completely dwarfed by Chrome. Safari is nowhere close to IE's monopoly.

Forced WebKit on iPhones and iPads is the only thing standing between Chrome and complete IE monopoly.

Re: Protecting your email address via SVG instead of JavaScript

#85

While there's nothing stopping this technique from being accessible in principle, the example given in the article is a really bad one. The article uses "Email us!" as the label on the svg and a elements, which effectively hides the actual email address from screen readers. Using aria labels in this way is a really bad practice, a screen reader user should have the same experience as anybody else unless there's a ver…

Isn’t the whole point of the exercise to not have the document contain the email address in a (machine-)readable format?

The NVDA screen reader reads this text as: "This is my email frame link email us." That is by no means equivalent to actually seeing the email address. I found that HTML entity encoding every single character of the link takes care of any spam problem already and is much more accessible.

Re: Protecting your email address via SVG instead of JavaScript

#87

i bought an premium .app domain a few months ago. not published in websites yet. no history of previous owners. just a fact that it's listed as a premium domain on registrars. first emails I received after the gmail welcome email were b2b sales from construction companies (i'm not in this field), shopify optimizations (i don't run one), agencies suggesting how i improve the ui/ux of my site (no website yet). thankful…

I believe the only effective protection against these fresh domain spammers is what you did:-some pretty good anti-spam mechanism such as Gmail.

Re: Protecting your email address via SVG instead of JavaScript

#89
post #70

Heavily guarded fortress would indicate something of value inside, and the big crooks may spend a little more effort. In the age of AI, this becomes even easier. { "model" : "gpt-4-turbo", "messages" : [ { "role" : "system", "content" : [ { "type" : "text", "text" : "return a json array of all valid emails found in the image." } ] }, { "role" : "user", "content" : [ { "type" : "image_url", "image_url" : { "url" : "da…

It won't make sense cost wise though

Except the cost is only going down over time

Re: Protecting your email address via SVG instead of JavaScript

#90
This is fun [2008]: https://web.archive.org/web/20180908103745/http://techblog.t...

"Nine ways to obfuscate e-mail addresses compared

"When displaying an e-mail address on a website you obviously want to obfuscate it to avoid it getting harvested by spammers. But which obfuscation method is the best one? I drove a test to find out."

Post reply on HN