Search the Community
Showing results for tags 'navigator'.
-
The file at this url contains exactly the code below, and the domain is SSL https://staging13.dgstesting.com/new2.html <!DOCTYPE html> <html> <head> <script> navigator.geolocation.getCurrentPosition(function(position){ document.body.innerHTML = position.coords.latitude; }, function(error){ document.body.innerHTML = error.message; }); </script> </head> <body> </body> </html> The problem: On chrome, edge beta (so basically chrome) and chrome on android, this code will succeed and print your devices latitude to the page. On Safari, safari for ios, and IE11, this will fail with the message "This site does not have permission to use the Geolocation API." I assume it's not referring to the user granting permission to access location data, but i checked this anyway. Doesn't appear to be the case because it's working in one browser but not another on the same device. In my example, it works in chrome but not ie11 on the same windows 10 computer. I also had a coworker confirm the same thing, it works in chrome but not safari on his mac. That leaves me thinking it's a domain issue, but why would it work in one browser and not another? After tons of Googling the best answer I can find is that it is an SSL issue, but if you go to https://developers.google.com/maps/documentation/javascript/geolocation you can see that even google.com is facing the same issue. So I think that rules that out. you can even try it on w3schools own site https://www.w3schools.com/html/html5_geolocation.asp Google of course has no input here because navigator is a product of html5
-
Hi, I have a website and, for a weird reason, I want one of its pages to be displayed using a navigator´s window with a smaller size than the normal ones. I would like to resize the window of that page to half size of a normal web page. I think JavaScript could be the solution to what I want. Do you know the script that I should use, in order to resize the navigator´s window? As a new developer, I appreciate your help! Thanks, Yumboxit