Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: utils.isSafariBrowser includes iOS-Chrome and iOS-FireFox #5033

Closed
r-ishigami opened this issue Mar 26, 2020 · 2 comments
Closed
Assignees

Comments

@r-ishigami
Copy link
Contributor

Type of issue

Question

Description

utils.isSafariBrowser regular expressions include iOS x Chrome and iOS x FireFox .
Is it a specification?

Prebid.js/src/utils.js

Lines 817 to 819 in 7c45626

export function isSafariBrowser() {
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
}

  • iPhone Chrome UserAgent
Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1
  • iPhone FireFox UserAgent
Mozilla/5.0 (iPhone; CPU OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/23.0  Mobile/15E148 Safari/605.1.15

Proposal

export function isSafariBrowser() {
  return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);
}

Relation

#3095

@bretg bretg mentioned this issue Apr 5, 2020
1 task
@bretg
Copy link
Collaborator

bretg commented Apr 5, 2020

Thanks @r-ishigami - PR opened, you're welcome to review.

@r-ishigami
Copy link
Contributor Author

Thanks, @bretg :-) Reviewed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants