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

  • Home
  • SEARCH
  • 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 7677895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:31:31+00:00 2026-05-31T17:31:31+00:00

Wondering if it is at all possible. found: <script type=javascript> isSafari3 = false; if(window.devicePixelRatio)

  • 0

Wondering if it is at all possible.

found:

<script type="javascript">
isSafari3 = false;
if(window.devicePixelRatio) isSafari3 = true;
</script>

on http://dustinbrewer.com/css-hackgetting-safari-to-behave/. but it seemed to target both chrome and safari, i’m assuming it’s more of a webkit target. also

console.log(isSafari3);

returned with a px count, not a boolean value. so i’m not sure what that guy was talking about.

thanks for the help.

  • 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-31T17:31:32+00:00Added an answer on May 31, 2026 at 5:31 pm

    You cannot reliably use the existence of devicePixelRatio to reliably detect just Safari. It might work today, but nothing is stopping some other browser from implementing that and then your code would be completely broken.

    It is generally a bad idea to test for a specific browser. The smarter thing to do is to test for a particular feature you want to use. If the browser shows the feature exists, you use it, if not, you use some other fallback mechanism.

    Feature detection is much, much easier to maintain because as browsers change, you don’t have to continually change your code to tweak the behavior for different versions of each browser. As browsers evolve by adding support for the latest features, your code automatically adapts to them.

    Here’s an article about feature detection: http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting. The library modernizr contains a lot of feature detection code snippets which you can either use in whole or see how it detects features and use just that specific detection.

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

Sidebar

Related Questions

I'm wondering if it is at all possible to get the total duration of
I was wondering what is the best way (if at all possible) to determine
I was wondering if it is possible to move all rows of data from
I'm wondering if it's possible to find all points by longitude and latitude within
Hey all, I'm just wondering if it is possible to get the name of
I was wondering if this is possible at all... I saw that IE, Chrome/Safari,
I'm wondering if it's possible to cast an object to a Type... I've just
I'm wondering if its possible to resize flash with javascript. I can't change any
Was wondering is this possible in .htaccess? I'm currently caching .js, .css and all
Hullo all, Wondering if there are any Java hackers who can clue me in

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.