API/ajax? related projects cant work on chrome (on my pc)

i’ve recently done the local weather exercise and is working on rand quote one.
the first few times i ran it it works well and displays everything, but later the $.ajax part has error and can’t get data
i tried opening that codepen webpage on another browser and on my phone, and they work.
so the code seems unfunctional only on chrome on my pc.

could anyone help me explain these? and could i fix it easily without changing the browser’s file or something like that?
thank you so much <3 !
my exercise↓

I am having the same problem with all my Codepens using navigator.geolocation.getCurrentPosition.

It is very strange. I have tried on Chrome.

In trying to help the OP, I discovered my solution suddenly no longer working either, in any browser on my laptop. Specifically geolocation isn’t functioning correctly.

I’m on win 10. I only mention because in checking all of my settings (on a system where geolocation worked fine up until this point, and settings weren’t changed) I decided to make sure browsers could access location explicitly in windows settings, but there was only an option to allow microsoft edge, not chrome or firefox.
Upon allowing edge, both my solution and the OPs worked, in edge only.
not that im suggesting anything nefarious on windows part…just wondering if its some quirk of a recent update

edit: Seems it was just a temporary chrome problem, works fine now.(and my firefox version was out of date)

im using win10 too and yes it works on edge…
and the mysterious thing is my code runs correctly on chrome now, again, without any changes from me…

maybe its just some chrome or win’s internal problem and i decide not to care about this anymore :wink:

Mine works now too, I guess it was just something about chrome. (as for firefox, mine was just super out of date, my mistake)

Good luck with the rest of your project!