Error message: (I’m limited to 2 links in my post, so imagine the https:// still being there)
Access to script at ‘errors.infinityfree.net/errors/403/’ (redirected from ‘priv.nexbit.ca/game/chat.js’) from origin ‘https://priv.nexbit.ca’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Hello!
I’ve been having issues related to modifying a script running on my website. My script used to be called chat.js, but I learned that infinityfree didn’t support that, so I decided to rename it to tester.js.
My page game.html calls index.js, which is supposed to call tester.js, except it didnt seem to update and still calls chat.js.
Is this a cache issue on infinityFree’s side? I always use incognito mode and have tried different computers.
Thanks for the help,
Toni
seems it deleted the lines I pasted that are in game.html…
it’s calling index.js with a version value to force the browser to update it
then, a console.log line to make sure that the new version of game.html is running
yes I know, I’ve seen the page…
As I said in my post, my issue is about changing the name of the script. I renamed it to tester.js, but now, my index.js doesn’t seem to update to the new version that calls tester.js.
I’m using SFTP using firezilla, and the files there should work…
But the chat isn’t hosted trough infinityfree? I thought that would be fine…
I’m using incognito mode and tried other computers and other browsers and ctrl+f5
Do the chat messages pass through our servers, or are they sent directly from the visitors’ browsers to the chat server?
I see you’re also using Cloudflare. Cloudflare’s “performance enhancements” mainly revolve around cache. So while developing your website, you may want to enable development mode in Cloudflare too so any changes you make to your website are immediately visible.
Or just purge Cloudflare’s cache, in addition to your browser cache, after making changes.
the whole game and chat are hosted externaly, so no problem there… Thanks.
I tried investigating cloudflare’s cache and couldn’t find anything, but I’ll go look at it more, that would make sense.
Thank you!
There are a lot more knobs to tweak how Cloudflare’s cache works. Just know that disabling or reducing caching will slow down your website and increase load on your hosting account, so choose carefully before completely disabling cache to be able to always see instant changes.