samedi 8 juin 2019

How can a web server determine the language/location of a browser sending Http Get requests to it?

Main question: How can a web server determine the language and location of a user loading their webpage. I believe the Accept-language in the header of the Http Get request isn't sufficient due to the following scenarios:

A)Some users never change their default Accept-language for their browser

B)The Accept-language sometimes only says language not country, so location is lost in this case

C)Some people are using a public computer or their friend's computer (toughest scenario)

In addition, I saw that in the Cookie field of an Http Get Request, there was one for "locale= en-US".

1) Does this mean that a cookie was stored for that particular URL for language?

2) Can other domains see this cookie field or only the domain that stored this cookie on the browser?

3) When is this "locale" cookie used?

4) What is the difference between "locale=en-US" and Accept-Language?

I've looked in the following:

Aucun commentaire:

Enregistrer un commentaire