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:
CSS@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:
CSS@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.
David R. MacIver said on twitter.com:
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.
Dan Hon said on twitter.com:
I used CSS media rules to have completely different content printed for an ARG puzzle once. It’s a neat simple trick 🙂
Odysseus360 said on twitter.com:
Really good blog posts I sometimes print to pdf and save it on my computer, in case the post or website goes down
@edent says:
File -> Save As. No need to print.
Daniel Aleksandersen says:
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.René Fleschenberg said on twitter.com:
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.
io said on csdisaster.club:
@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
whisper moth said on husk.site:
@Edent It always makes me wonder where those people think paper comes from. Do they realize it doesn’t contribute to deforestation at all?
Caroline Jarrett says:
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)
Cidney Hamilton says:
Strongly agree. You can use the same CSS technique to add a warning message admonishing people against wasting paper without taking away accessibility.
Keep Politics In Football said on twitter.com:
I have been to interviews where they've printed out my CV. Spoiler alert: this does not print good sam.pikesley.org/cv/
Michael says:
Won't somebody please think of the paper??
Rob Redpath said on twitter.com:
Lots of people suggesting screenshooting, but Reader Mode (in safari on ios) actually makes it quite nice to print…
Alan Pope 🍺🐧🐱💉💉 said on twitter.com:
Microsoft Edge has a nice easy workaround. Open the page in "Immersive" mode and then CTRL+P to print. Fun hack though.
Rune :blobpeek: said on mcd.dk:
@Edent one time while I worked as an it consultant someone at an oil company had this huge footer about considering the environment before printing the email.I couldn't decide if it was more paradoxical because they worked at an oil company or just that the footer easily quadrupled the print size of every single email.Also, lots of people still print emails. At my previous job we had departments wearing down enterprise printers in months because they printed EVERYTHING..
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!
Alan Ralph 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.
Andreas Gohr says:
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.
@edent says:
Your eReader will read HTML just fine. And it will be a better experience than PDF.
Andreas Gohr says:
No it doesn't. ePub it would do. But my browser doesn't produce ePub natively.
@edent says:
ePub is just zipped HTML. Every eReader I've had can read HTML files. Which one do you have?
Andreas Gohr says:
It's a Remarkable 1. See https://support.remarkable.com/hc/en-us/articles/360006761638-Which-file-types-are-supported-on-reMarkable-
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.
Ben Nuttall said on twitter.com:
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...
Wartijn said on twitter.com:
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.
David Durant said on twitter.com:
Congrats for making @BoingBoing with this @edent : boingboing.net/2021/06/21/how…
Vicky Teinaki said on twitter.com:
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…
Benjy Stanton said on twitter.com:
Hmm yeah this technique does feel like it’s introducing a barrier that would unfairly exclude some people.
Daniel Aleksandersen says:
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.
@edent says:
Which part of "digital fundamentalist" made you think I wasn't elitist?
Simon Everest said on twitter.com:
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?
Alex said on twitter.com:
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”).
Richard Morton (he/him) said on twitter.com:
This isn't a good idea. Some people need to print things for a number of different #accessibility reasons, and they are unlikely to know how to bypass any warnings or barriers. #a11y
Alison Bell said on twitter.com:
I’m not dyslexic but definitely prefer working with things by hand! All the screen time recently has killed my eyes.
katie said on twitter.com:
rarely disagreeing with you on this one - there are many good reasons people want/need to print this kind of content.
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.
@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.
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.
Chris Midgley says:
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.
Suw says:
That's good to know, actually. But breaking built-in print-to-PDF would still be bad.
m 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?