Mobile Safari: Is there a way for a web site to detect an iOS user's "Region Format"?
-
Trying to get the iOS device's: Settings > International > Region Format I looked at the environmental variables using: http://www.ranks.nl/rools/envtest.html But the closest I got was the HTTP Accept Language, and it only seems to update based on: Settings > International > Language So for instance, if I set "Language" to be English, and "Region Format" to be "Thailand", in the browser when I try to get "window.navigator.language", I just get "en-us". How can I get the Thailand part? Note, this is a web page, not a native app. Thanks!
-
Answer:
You cannot get region info of a user, no matter if they are on desktop or mobile. All you can get is about what the browser reads OS information and sends to your website. I believe iOS Safari only sends you OS language in the browser for now. Your only chances are as you said HTTP Accept-Language header and navigator.language.
Ahmet Alp Balkan at Quora Visit the source
Other answers
iOS Safari only gives you the language information, not region. Your desktop browsers usually give the region as well. Just ran some tests with a desktop Chrome on a Mac (set on English + GB) and iOS Safari (set on English + GB) and the Accept-Language headers are the following: Chrome on Mac set on English + GB: en-GB iOS Safari set on English + GB: en-US (because it defaults to the standard locale) This is similar when you are for instance French Canadian. Accept-Language will return fr-fr.
Lee Provoost
Related Q & A:
- How To Make A Web Site?Best solution by Yahoo! Answers
- Is there a web site you can post comments about a business that sells products via the web. Like the BBB?Best solution by Yahoo! Answers
- How does someone make money owning a web site?Best solution by Yahoo! Answers
- How to set up a web site?Best solution by Yahoo! Answers
- Does Wal-mart have a web site?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.