Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

364
Views
How to detect device's screen resolution on macbook?

It's said that to calculate screen real resolution I need to multiply screen.width by window.devicePixelRatio. The thing is on one of my laptops it works perfectly fine, window.screen.width = 1280, multiplying by pixel ratio (2) = 2560, which is correct according to system information.

But on my second laptop screen.width = 1440px, and pixel ratio is 2, which gives 2880px in width, but in system information it's said my resolution is still 2560 x 1600.

So how do I calculate screen's resolution in this case?

screen.width

real resolution

PS: my second laptop is 13" macbook pro 2020

PPS: well, I realised it depends on my settings, and is there a way to know the device's resolution as my settings can vary?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

well, after some research I realised, that there's no way to get physical characteristics of displays, and device pixel ratio won't show the real css-to-physical pixels ratio

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!