5 ms·
I recently noticed an uptick in cold emails and spam after publishing my new website. After a few weeks, I asked Claude/Cursor to obfuscate the email for spam p
by vlucas 6mo ago
I recently noticed an uptick in cold emails and spam after publishing my new website. After a few weeks, I asked Claude/Cursor to obfuscate the email for spam protection in the mailto: link, and thy both used JavaScript with data attributes.
Something like:
```
<a
href="#"
class="js-mailto ${className}"
data-email-user="${local}"
data-email-host="${host}"
data-email-subject="${sub}"
>
${children}
</a>
```
And then some light vanilla JS to stitch it together. Works in the browser, and spam has dropped off a cliff since.