Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6772355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:32:24+00:00 2026-05-26T15:32:24+00:00

WebKit introduced the -webkit-device-pixel-ratio media feature and window.devicePixelRatio JavaScript property, to allow web authors

  • 0

WebKit introduced the -webkit-device-pixel-ratio media feature and window.devicePixelRatio JavaScript property, to allow web authors to detect whether their page was being rendered on an iPhone with a retina display:

  • https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/OtherStandardCSS3Features.html#//apple_ref/doc/uid/TP40007601-SW3
  • http://www.robertprice.co.uk/robblog/archive/2011/5/Detecting_Retina_Displays_From_JavaScript_And_CSS.shtml

Mozilla and Opera have introduced equivalent media features, -moz-device-pixel-ratio and -o-device-pixel-ratio. However, they don’t seem to have introduced the JavaScript property to go along with them.

Is there any way to detect the device pixel ratio via JavaScript in Firefox and Opera?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:32:24+00:00Added an answer on May 26, 2026 at 3:32 pm

    You can test media features from JS using https://developer.mozilla.org/en/DOM/window.matchMedia

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use WebKit's box-shadow css property for a little drop-down. The
Webkit Develoepr tools says the following Javascript Error: Unsafe JavaScript attempt to access frame
WebKit has introduced the ability to create CSS gradients. For example, with the following
In webkit on android, it has a 'magnifying glass' feature: in the zoom out
I have the following: -webkit-transition-property: top, bottom, z-index; -webkit-transition-duration: 0.5s; Problem is I don't
In WebKit I get the following error on my JavaScript: Refused to execute a
I work on a WebKit-based app that runs several different web apps for a
in iOS5 (as we all know by now), Apple has introduced -webkit-overflow-scrolling which allows
I have the -webkit-transition-duration property set on a div, whose height is set by
My problem is WebKit cannot handle xslt document() method when i use javascript to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.