Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jared_kipe

macrumors 68030
Original poster
Dec 8, 2003
2,967
1
Seattle
I recently redesigned my gallery software, and in doing so I created some links that do things like flag or rank pictures. If you don't have javascript enabled they will still function, albeit in a somewhat weird way.

With javascript enabled, I intercept the click events and use ajax to get the results back.

The problem I had was that web crawlers like google are now "clicking" the links and voting on things unknowingly.

I've thought of a couple of ways to prevent this from happening but was wondering what the general consensus is on the matter.

1) abandon non-JS browsers and move the href portion of the link into the javascript.
2) have the server side code check the user's agent type and simply not do anything for some user agents.
3) abandon the current link paradigm for a button one.

I have some other questions, but I'm gonna start with this one as it may change the other questions. Thanks in advance.
 
That was another idea I had, but after reading about it I discarded it.

The reason is that according to wikipedia, search engine crawlers will still follow the link, they just don't index the page.

In fact, rel="nofollow" is explicitly stated as NOT being to block access to or prevent content from being indexed.
 
You could try setting up your robots.txt file to indicate some of the areas not to go, either by file or directory.

Shouldn't help, because I want search sites to index the page, just don't want them to click certain "button" like links.

After looking at hulu.com's buttons I decided to emulate them. I replaced all the old href's with id= and made the href="#" for the links. Obviously I changed my javascript appropriately to pull the id instead of the href as the url.

So this sacrifices users with javascript turned off, but it isn't a huge deal.
 
Shouldn't help, because I want search sites to index the page, just don't want them to click certain "button" like links.

You don't add the pages the the links are on, just the links that you don't want them to initiate.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.