Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the konami link more difficult to be parsed by Google #89

Open
porduna opened this issue Jun 26, 2014 · 0 comments
Open

Make the konami link more difficult to be parsed by Google #89

porduna opened this issue Jun 26, 2014 · 0 comments
Assignees

Comments

@porduna
Copy link
Collaborator

porduna commented Jun 26, 2014

Right now, the JavaScript works as:

   images[i].src = "/labman/media//konami_code_persons/full-name.jpg";

And Google probably checks that this link exists and indexes it. Since we don't want this to happen, we could change this code for:

   var url = "/labman/";
   var rnd = Math.random();
   if (rnd >= 0) {
        url += "media/konami_code_persons/";
   }
   if (rnd >= -1) {
        url += "name-of-person-encoded"; 
       /* e.g. 
       >>> ''.join([ '%' + ('%x' % ord(i)).zfill(2) for i in 'pablo' ])
       '%70%61%62%6c%6f
       */
   }
   images[i].src += url + ".jpg";

In the meanwhile, I'll use robots.txt to remove support for:

http://www.morelab.deusto.es/labman/media//konami_code_persons/
http://www.morelab.deusto.es/labman/media/konami_code_persons/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant