Skip to content

Consider a standardized way to detect PDF in HTML? #3462

@travisleithead

Description

@travisleithead

After running across a site interoperability issues in Edge, we'd like to raise the possibility of a standard (or suggested) way for surfacing a UA's support of PDFs. Would love both opinions and proposals.

Today, among Chrome, Edge, and Firefox, Chrome and Edge both add an entry (or entries) into the navigator.plugins and navigator.mimeTypes collections such as:

  • {type: "application/pdf", suffixes: "pdf", description: ""}
  • {type: "application/x-google-chrome-pdf", suffixes: "pdf", description: "Portable Document Format"}
  • {type: "application/pdf", suffixes: "pdf", description: "Edge PDF Viewer"}

E.g., the site honda.it tries to detect a variety of potential strings here: var p=["Chrome PDF Viewer","WebKit built-in PDF","Adobe Acrobat"];

Sites are starting to take an interest in these. Perhaps we should come up with a vender-neutral way of advertising support for PDF?

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposalNew features or enhancementsneeds concrete proposalMoving the issue forward requires someone to figure out a detailed plan

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions