Weather app Firefox


I am working on Weather App and I am having problems trying to make it work in Firefox. App works in Safari.

Here is my code:

var lat;
var lon;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) { 
  lat = String(position.coords.latitude.toFixed(2));
  lon = String(position.coords.longitude.toFixed(2));


      url: "",
data: {lat: lat,lon: lon},
      success: function(x) {
                $("section").html("<strong>" + x.main.temp + "</strong>" + " " +[0].icon + " " +[0].description + + " " + x.main.humidity + " " + x.wind.speed);

And here are the errors that I get in Firefox

"NetworkError: 500 Internal Server Error -"
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Thank you very much! Nice solution and great explanation :slight_smile:

1 Like

Hello! I want to share with you a useful link in which you get to know and learn a lot of extension & tools as well code also, actually I was facing popup message problem often mozilla firefox critical error message. then I visited this link I got all the solution to my problem. it contains very useful information, do visit it may surely help you.