Skip to main content

Disable Printing in Browser

I was researching on an effective way to disable printing from browser and I found a blog post to resolve the issue using CSS, so here is the code that was testing on Mozilla firefox safari and explorer:

<style type="text/css">
@media print {
body { display:none }

add this code to use CSS file or simply withen the headers of your html page.

Reference here


  1. Sometimes, it's really annoying to have this feature on your browser. Great tip!


Post a comment