Open the print dialog
Opens the system print dialog for the page, no click required in most browsers.
In one line
Can open your print window, without a click in most browsers
Opens the system print dialog for the page, no click required in most browsers.
A site can ask to print itself or a hidden frame. It cannot choose a printer or print silently, and it cannot read what the person does in the dialog.
What it can and can't do
What the user does: Nothing in most cases. It happens when the page runs a print command, or you tap Print.
It can
- Open the print dialog for the current page
- Format the page for print with its own print styles
- Let you save the page as a PDF from the print window
It cannot
- Print without you pressing Print in the dialog
- Pick a printer or change the settings for you
- See what printer you use or what your printer is called
- Print in the background after you leave the page
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 1.1 | 2003-10-24 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | window.print(); beforeprint/afterprint events; @media print |
| Browser compat keys | api.Window.printapi.Window.beforeprint_event |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | One-shot |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Sandboxed frames need allow-modals; cross-origin frames print only their own content |
Typical flow
- Script calls window.print()
- Browser opens print preview
- afterprint fires when the dialog closes
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Blocks the page until the dialog is dismissed in most browsers
- Cannot print silently, choose the printer, or read the print result (no kiosk printing without enterprise policy)
- Chrome ignores print() in sandboxed iframes lacking allow-modals
- Repeated print() calls are not rate limited in the spec; Chrome limits when the tab is in the background
- Page cannot read the printed output or the printer list
The story
What it is
A page can open your print window, usually without asking.
For you
A receipt or ticket page may open the print box by itself. You can always cancel it. Nothing prints until you confirm.
For makers
Makers use it for receipts, tickets and reports, so you get a clean paper version in one step. Print style sheets also let one page look right on screen and on paper.
Where you see it
| Type | Example | Apps |
|---|---|---|
| travel | After booking, a boarding pass page opens the print box so you can print it. | Ryanair, Booking.com |
| banking | A statement page offers a print button with a layout cleaned for paper. | None named |
| shopping | An order confirmation has a Print receipt button. | Amazon |
| education | A school portal prints a certificate or a worksheet. | None named |
| productivity | An online document tool prints a neat version without the toolbars. | Google Docs |
| enterprise | A warehouse tool prints shipping labels as soon as an order is packed. | None named |
Risks
- Surprise print dialogs
- Printing private data
Good uses and abuse
Legitimate uses
- Receipts
- Invoices
- Tickets
Known abuse
- Print dialog spam
- Distraction loops
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2023-01, Chrome 112: Print from sandboxed iframes requires allow-modals
Sources
How well checked: Based on official documentation.