Masquerading ACM Authorizer Links
ACM recently released the ACM Authorizer service. It allows authors of ACM papers to link to ACM’s digital library from their website. Users who click the link will receive access to the author’s paper free of charge.
The main concerns I had about changing my website to link to this new service are:
- If ACM’s website is down, my paper is no longer accessible
- An independent copy of my paper’s PDF would not longer be linked in Google’s search index
There is an easy workaround to this problem. You can keep your markup linking to a local PDF of your paper and use javascript to rewrite the link.
What I did was change my paper’s link from this:
<a href="docs/feeding-frenzy-sigmod10-web.pdf">PDF</a>
to this:
<a class="acm_authorizer" id="acm_350703" href="docs/feeding-frenzy-sigmod10-web.pdf">PDF</a>
I chose to use a class for my ACM links because a class-based lookup is very fast. I put the ACM digital library identifier into the id attribute of the element, but it has a prefix because HTML id’s are not allowed to start with a number (so my HTML still validates).
Now, it’s easy to add some javascript to rewrite the link on page load:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.acm_authorizer').each(function() {
$(this).attr('href', 'http://dl.acm.org/authorize?' +
$(this).attr('id').substr(4));
});
});
</script>
The first script tag loads jQuery from google’s CDN. The second script tag finds all a elements with a CSS class of “acm_authorizer” and changes their href attribute to point to the ACM digital library — getting the ACM ID from the id attribute of the element.
With this, users who visit the site with JavaScript enabled will be directed to ACM, but the markup of the page points to a copy of the paper on my site, keeping it in the index of search engines. You can see this in action at my website.
Pingback: Veterinario Cosenza
Pingback: kurier dhl