Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

Is there any way to increase timeout of JS loading from script tag?

  • 4 ответа
  • 1 имеет эту проблему
  • 1 просмотр
  • Последний ответ от user1929

more options

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?

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?

Все ответы (4)

more options

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/ .

more options
more options

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".

more options

Can you share the HTML that the script is loaded from?