Open mattjuffs opened 10 years ago
That's probably not going to work. If I came along and searched the DOM then you could find any email address with that method with just this
$('a[href^="mailto:"]')
Bugger, there's no way around them is there then? I could resort to an image, but it's not very user friendly.
Yeah there are still a few ways around, just need to be clever about it.. I would create an MVC helper and Route that worked together
https://gist.github.com/AaronLayton/9351598
It is a Gist so you can update that the same as you would a normal repo (I think)
Ah, I see what you're doing there - it might be possible to just setup a redirect in the web.config then, if running on IIS.
Would the redirect be able to replace certain characters?
Not sure, but you could simply have href="/contact/email"
in the HTML and then a 301 redirect to the mailto link - but chances are the spiders/bots would be able to crawl the /contact/email
link.
Ah I see what you mean, web.config would work for a singular then..
I think normal bots (Google) would follow the redirect and then not cache the mail to?
Could also just add a robots dissallow for the URL folder
I'll try the web.config method - it's got to be better than plaintext.
Replace the plaintext email with an obfuscated one: http://snippets.slickhouse.com/javascript/105/write-out-email-address/