FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Mar 11, 2012, 5:28 AM
272 Posts

Re: Detecting if you use Safari or not

  • Category: Other
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 5
This behaviour is caused because both browsers are using the webkit engine and the getUserAgent() method only checks the HTTP Header sent by the browser if there is a specific string inside.
 
You have to check for Safari *only* by checking if it is not Chrome too:
 
context.getUserAgent().isSafari() && !( context.getUserAgent().isChrome() )
 
Sven
 

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.