Print Content Pages With JavaScript

Posted on

  • email
  • twitter
  • facebook
  • share this

share this

There are hundreds of reasons why you should let website visitors print content directly from your site. Say for instance that you are hosting a seminar - you could include driving directions or offers from local hotels. If you are a publisher like WSM you could provide your editorial calendar or article submission procedures. Retail sites could include order forms, privacy policies, product guarantees. Consulting sites could provide e-books, white papers and newsletters. But why should you provide the ability for users to print your content directly? Well, for one reason we don't all have time to sit and read pages and pages of content and will often print materials and them read later. You'll find those sites that provide content AND offer a means to print content typically receive results long after their visitor leaves since it provides greater (longer term) reach for marketing efforts.

The following is the most common way to let users print content from Web pages. Achieved by the following JavaScript code:

 <A HREF="BLOCKED SCRIPTwindow.print()">Click to Print This Page</A>

Should you include the print function on every page?
Well, of course not. But you may want to include it on specific pages such as those outlined above. The following is some "best practice" guidance on developing your own "print content project" at your own site.

Make a Page for Printing:
Since the majority of sites use a combination of site-based images and advertising, many site developers and webmasters create "text-only" pages limited to only what is relevant to the user (the content) and leave out arbitrary on-site links and third-party advertising as they will often cause additional pages to be printed as opposed to only what is necessary.

Customize the Printing Page:
Remember that most visitors using this function will print the content for later review. It is important that you include a link where that content can be found again and perhaps some information on your company. This is a crucial step for those offering online product guarantees, coupons, terms and conditions, etc. - essentially anything that is either important for the user to know or important for you as a site owner to convey.

Direct Users to the Print-Only Version With Anchor Text:
There is always a hidden "double-benefit" to doing things the right way. Not only will your users appreciate the fact that you are sharing content and providing it to them in a format they can carry with them there are some very obvious benefits when it comes to optimizing your website. When you direct users to a printed page, do so not with images but with keyword based anchor text which will be weighted by the search engines more beneficially. Anchor text is the text that you use for linking to a page - so instead of using the phrase "Click to Print This Article" use anchor text such as "Printing Pages with JavaScript".

All in all, it may take a little work to transform existing content to utilize this approach, but the benefits are obvious are long term.

Javascript | java | Website Services Magazine


Login To Comment

Become a Member

Not already a part of our community? Sign up to participate in the discussion. It's free and quick.

Sign Up


Simon Iddings 01-10-2012 9:18 PM

I agree with this totally because one of the sites I frequently visit even remembers my ID and when I send the information to my printer, it stamps my ID in the header, almost like a personalized information card.

Fred Martinez 01-22-2013 11:01 PM

I think by creating printer friendly pages on website will improve the quality of the web.  Users tend to appreciate such functions and tend to return visit on these pages. This is especially important for service websites. Web designers should also consider fitting text and images on the same page so as to avoid paper wastage during printing.

Add to the discussion!

999 E Touhy Ave
Des Plaines, IL 60018

Toll Free: 1.800.817.1518
International: 1.773.628.2779
Fax: 1.773.272.0920