Duplicate content - print this page

We’ve seen this scenario. Many web developers tend to do another page(mostly a popup with the main article). While the easy way to do it is by using the print() function from javascript, some will say that there is a chance that javascript can be disabled. And they are right, but there are only a few people, and basically if they know how to disable it they will know how to enable it again to use the print button.

Don’t use different page format. Just because you changed the layout of that page doesn’t mean that it’s a new page! Actually it’s a new page but the content (wich is the most important) is duplicate. Now the problem with this is that you can end up in google results with the undesirable page. You don’t want people land from a search engine directly on your print page! Most likely there will be no menu bar to navigate in your site.

- use css to style your print layout. You can hide elements that you don’t want to appear on the printed page by using display: block;

<link rel="stylesheet" type="text/css" href="/css/print.css" mce_href="/css/print.css" media="print" />

<link rel=”stylesheet” type=”text/css” href=”/css/print.css” mce_href=”/css/print.css” media=”all” />

- use javascript - just add this code!
<a href="#" mce_href="#" onclick="javascript: window.print();">Print this page</a>

If you really want to use the method with a separate page then be sure to use the the noindex on that page. This will tell the robots not to index that page.

<meta name="robots" content="noindex">

I recommend to use the “javascript solution”. The reason is that even thou there are some people with js deactivated there are some robots that will ignore the noindex directive! The choice is yours!

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

good point.
duplicate content can really be a pain in the behind.
last time i read some statistics, 4% of the users had JS de-activated, so the JS print is the best solution by far.

Leave a comment

(required)

(required)