networking – Wifi Hotspot – Getting 504 Timeout (and CORS) when cache is not disabled

I have an android phone that I’m using for wifi hotspot to which I connect my laptop to. There is generally no problem with it however sometimes content just doesn’t load.
I tried checking the Network DevTools to see what the problems are and figured out what requests were causing it. The causes were requests to a different domain and they are in “(pending)” status for a long time and eventually turning “CORS error missing Allow Origin”. Upon examining further (using a different network) the responses properly have the needed headers and the requests properly have the origin matching the allow orgin header. When I tried checking again (with the mobile network), the response it receives is the 504 Gateway Timeout (which doesn’t have the allow origin header) so Network DevTools i think treated it as CORS.

Now the thing is, when I try to use the “Disable Caching” feature of devtools everything works fine (except that caching is disabled so it eats quite more). So I am not sure what would be the cause of the 504 timeouts and if possible find a solution for it.

I’ve also noticed that I can load the requested url on a different tab and then that specific resource would load fine on the main site I was visiting but doing this for every resource is pretty tedious and doesn’t really fix the issue. I have also tried using a different android device with the same SIM but it still had the same results.

As a band-aid, I was thinking of disabling cache for the specific domains but I am still unsure of how I will do it.