You can't print this blog post

Update! It's fair to say no one liked this idea - so I've reverted it. Thanks for all the feedback 🙂

Do you ever see those daft email footers which say "Please consider the environment before printing this email." Like, who the fuck is still printing out their emails?

Anyway, a few years ago I went along to a blogging event where someone had printed out one of my blog posts. I was stunned. They'd stuck of loads of my posts (and other people's posts) on a mood board. Because I'm a digital fundamentalist, this pissed me off - what a waste of paper. Printing off a blog post is like making a radio broadcast of a sunset. Just pointless.

Luckily, there's a (very weak) form of DRM you can use to dissuade people from printing off your web pages:

@media print {
  html { display: none; }

CSS has Media Rules for printing. You're supposed to use it to remove background images, menu bars, and other things which aren't useful. In this case, I've just told the browser not to display any content when it tries to print.

You can go a little further. This stops the page from rendering when printed, and adds a handy error message:

@media print{
    body { display: none; }
    html::after {
        content: "Please consider the environment before printing this blog.";

I've tested this, and it works in Firefox, Safari, and Chrome. It's trivial to defeat this technical protection mechanism if you're handy with developer tools - but I guess those aren't the people who are printing off the entire Internet.

41 thoughts on “You can't print this blog post

  1. I do sometimes print out longer blog posts, for much the same reason I print out academic papers: It really is sometimes a better medium for reading longer content in.

  2. says:

    I used CSS media rules to have completely different content printed for an ARG puzzle once. It’s a neat simple trick 🙂

      1. Yeah, but what format will you get? There has been a format wars in this space going on for years. Multipart-HTML has made a reappearance in recent versions of Blink, but won’t open in Safari or Firefox. Safari has its own binary-XML M/HTML-inspired “Web Archive” format that won’t open in any other browser. Firefox saves the HTML file together with a directory of most but not all the resources required to render a page. This last format is similar to Blink’s default non-M/HTML format, but makes different decisions about what parts of the document to save.

        Print to PDF is a good and accessible method for archiving pages that preserves formatting. Web developers can spend two minutes out of every year to add a @media (print) { some-miniscule-layout-fixes-to-optimize-for-print } and their users will get a good-enough archival format when they need it.

  3. There are valid reasons for printing digital content. It can be easier to read. You can read paper when there is no power supply. I'd assume the reader knows better than the author what the best medium is in their case.

  4. says:

    @Edent that's silly but imo harmful. The potential energy use of using a screen to access a post every time might be more than referring to the same sheet of paper

  5. Sorry Terry but this is an ableist idea.

    For example, my parents get a visitor to print emails so that my Mum (who is bedridden and who can’t use an electronic device due to mental confusion) can enjoy reading them to my Dad who is blind. This gives them both pleasure.

    You might argue that your blog posts aren’t aimed at my parents and you would be right, but I am sure that there are other examples of perfectly good reasons why people want or need to print your stuff.

    If I do, I’m sufficiently web-savvy to copy it to a something that will print.

    Why take away a sensible feature that you don’t know all the use-cases for?

    (And I recall you got quite narked with an app that did that to you recently)

    1. Strongly agree. You can use the same CSS technique to add a warning message admonishing people against wasting paper without taking away accessibility.

  6. Alcides Fonseca says:

    Good way to prevent someone from suing you based on your blog content. They won't be able to print it to include in the legal process!

  7. says:

    I agree with what Caroline Jarrett posted above — this is a very bad idea that doesn't help anyone. I haven't printed off a web page onto paper in years, but what I have done is 'print' pages as PDF documents for reference. Your CSS hack would remove that option too.

    Look, I get the desire to minimise your environmental footprint, I'm trying to do the same here as much as possible. But there's no need to be snarky about it.

  8. Others already pointed out how this is an accessibility problem for disabled users. The approach also prevents "printing" to PDF which I might wanna do to read your post on my E-Reader.

    1. @edent says:

      Your eReader will read HTML just fine. And it will be a better experience than PDF.

        1. @edent says:

          ePub is just zipped HTML. Every eReader I've had can read HTML files. Which one do you have?

          1. It's a Remarkable 1. See

            Anyway, I think this discussion is missing the point. You are actively sabotaging a browser feature because you think know better than your users how they want to interact with your content. It's like disabling right or middle clicking or hijacking the back button.

            You're of course free to do whatever you want, especially on your own personal site. But I think you can see from the rest of the comments how people feel about this.

  9. An org I used to work for used to dissuade/prevent users from printing off the worksheets despite the fact most of them told us they needed to because they ran workshops offline! What a way to piss off their community...

  10. says:

    I think this is a bad idea. You shouldn't block browser functionalities just because don't like or use them.
    If this takes off browser might decide they ignore this rule, just like autocomplete="off" doesn't always turn autocomplete off.

  11. In user research I've found that people print things out:
    - so that they can 'work with it' by hand (including a dyslexic person)
    - so that they can take it in the car and fill out forms on their phone while watching the kids
    I save my hate for screens that use up all the ink…

  12. You may not see a need for paper, but to deliberately break it for those who do is some incredibly elitist bullshit. Maybe someone “prints to their e-reader” as a read-later list Why not optimize the print pages instead? It’ll take you two minutes to tweak the layout to ensure needless extra pages or interactive page elements (like that huge calendar further down on this page) aren’t printed. That’ll preserve functionality for those who need it, and avoid wasting more paper than absolutely required.

    1. @edent says:

      Which part of "digital fundamentalist" made you think I wasn't elitist?

  13. Others have said it more eloquently, but this is daft @edent – many folk have enough trouble already without useful functionality being disabled for lols. Besides, what's more wasteful? Printing a page I want to read, or printing a page but getting a sarcastic message instead?

  14. says:

    How many sheets of recycled paper match the environmental impact of another device with another Li battery, more conflict minerals, more plastic. Framing this as an environmental thing obscures the behaviour it supposes on the other end (“just buy an e-reader”).

  15. says:

    rarely disagreeing with you on this one - there are many good reasons people want/need to print this kind of content.

  16. Suw says:

    I know you're just being a bit contrarian, but this is nonsense. As well as all of the good points above, I frequently print to PDF when I'm doing research so that I can put the document into Notability on my iPad and then scrawl notes all over it. There's no save-as option that achieves that, and trying to print to PDF from a saved version of this page also doesn't work. Screenshots won't work for a multi-screen page, and I shouldn't be forced to use specialist software to take a full screenshot when print to PDF is built right in. It's just not your responsibility to decide who prints what.

    1. @edent says:

      I have seen the error of my ways and reverted. But I do wonder on your last point, do you think my print CSS should exclude page furniture? Someone higher up the comments wanted me to remove some of the navigation elements. But you're saying that I shouldn't.

      1. Suw says:

        Printing from web pages is ugly right now, and it's kinda shocking to me that it's 2021 and no one seems to have really thought about the 'printing' use case at all. There ought to be options. Sometimes, yes, I'll want all the furniture because for whatever reason there's useful info there. Often, no, I just want the content. But mostly what you get now is a fugly mess instead, whether you want it or not.

    2. Screenshots won't work for a multi-screen page

      You can save a screenshot of a multi-screen page using Firefox's built-in "Take Screenshot" feature (on the right-click menu, or Ctrl-Shift-S), then selecting "Save full page" at the top right. Sometimes you have to scroll to the bottom so that all the images load.

      It's possible this counts as specialist software.

      1. Suw says:

        That's good to know, actually. But breaking built-in print-to-PDF would still be bad.

  17. says:

    Sometimes I speak to (usually elderly) people who tell me of the great deal they have on their /subscription printing service/. I reply proudly that I print SO MUCH that the starter cartridge in our printer is still not done and it has been >4 years. Who prints anything these days, except when dealing with either bureaucracy, old people or the government?

Leave a Reply

Your email address will not be published.

%d bloggers like this: