Is there any way to increase timeout of JS loading from script tag?
I have site hosted far away from me so some of JS loaded by script tag have about 3+ seconds to load. Sometimes they are not loaded at all. I suspect this is because of time firefox is waiting for img/js and so on is loaded. But it would be nice to increase this timeout for debugging purpose. Unfortunately I've failed to find anything like this in about:config so may be someone could help me?
All Replies (4)
You shouldn't be running into any kind of timeout after 3 seconds. I'm not actually sure whether Firefox has a built-in timeout or not, but when web servers implement something like that, it's usually around 60 seconds, so I can't imagine Firefox would be much different.
Could you be more specific about what the problem is? Do you see the script failing to load in the network panel of the devtools? Do the page contents not appear? A URL would also be helpful if you're willing to share that.
If this happens in every browser, and you're looking for general web development information, you may be better off asking somewhere like https://stackoverflow.com/ .
Well, timeout was just a guess and looks like it wasn't lucky. I attached screenshot of how script loading looks like (see base_load). Pay attention to base.js being requested twice (they are pretty same requests but first one without any visible response). Second response has following headers:
server: nginx date: Wed, 17 Jan 2018 08:46:05 GMT content-type: application/javascript content-length: 13560 last-modified: Thu, 07 Dec 2017 14:29:01 GMT etag: "5a29502d-34f8" expires: Thu, 31 Dec 2037 23:55:55 GMT cache-control: max-age=315360000, public, must-revalidate accept-ranges: bytes X-Firefox-Spdy: h2
And there is one more screenshot (base_load_once) when same script has been loaded with one request. It has headers: server: nginx date: Wed, 17 Jan 2018 09:33:52 GMT content-type: application/javascript content-length: 13560 last-modified: Thu, 07 Dec 2017 14:29:01 GMT etag: "5a29502d-34f8" expires: Thu, 31 Dec 2037 23:55:55 GMT cache-control: max-age=315360000, public, must-revalidate accept-ranges: bytes X-Firefox-Spdy: h2
I took both these screenshots in private mode, after clean up history for this site and while opening exactly same URL.
So looks like my initial guess and first question were not exactly right. Probably there real question is there any way to see what is going on first request to base.js and why sometimes it looks "unfinished".
Can you share the HTML that the script is loaded from?