I am sending HTML-formatted event invitation emails to customers with accept/decline links in them. It seems that some of these links are being pre-fetched though, resulting in the invitations being auto-declined. Oh goodie.
I have included the rel="nofollow" attribute on the links to prevent email servers, clients or other lurking middlemen from 'clicking' the links. This has helped but not entirely eliminated the problem - I still have some bot pre-fetching the links when sent to outlook.com addresses at least
I would like to avoid requiring additional action on the part of email recipients after (genuinely) clicking these links, especially in the 'decline' case, so I see there being two avenues to solving this:
- Find additional mechanisms to prevent wayward bots from following the links in the first place. Nothing else on this coming up in my searches so far though.
- Detect the bot activity when links are pre-fetched and ignore them in such cases.
For the latter, it is not merely a case of checking the UserAgent header - the example I am presently seeing is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Admittedly an old version of Chrome already, but that's not a valid reason to ignore it! Unfortunately, I don't see anything else useful in the HTTP headers to tip me off either.
What I don't know yet is whether or not the pre-fetching culprit will attempt to execute any 'onload' Javascript code on the landing page. If not, that may be the ticket.
Any suggestions appreciated!
UPDATE
Have tried responding to initial query with a page triggering a client-side redirect either via a <meta> tag or using a body onload event handler. Both were executed by the offending bot, so no joy there at least. I'm wondering if I'll have to sink to an invisible recaptcha to solve this one. Yuck.