{"id":1218,"date":"2022-08-16T09:31:03","date_gmt":"2022-08-16T09:31:03","guid":{"rendered":"https:\/\/mklasen.com\/?p=1218"},"modified":"2022-08-16T09:34:56","modified_gmt":"2022-08-16T09:34:56","slug":"detecting-the-users-global-location-using-javascript","status":"publish","type":"post","link":"https:\/\/mklasen.com\/detecting-the-users-global-location-using-javascript\/","title":{"rendered":"Detecting the user’s global location using javascript"},"content":{"rendered":"\n
A while back I wanted to show\/hide a box on my website based on the location of the visitor. There’s a couple of options to get the user location:<\/p>\n\n\n\n
Use an API which you send the IP address to and get a location back (find services by googling “geolocation ip address api”)<\/li>