Why Does XMLHttpRequest Fail in Firefox but Works in Chrome and Edge?

0
6
Asked By CuriousExplorer123 On

Hey everyone! I'm dealing with a problem on my website where users can upload videos. The uploaded files, mainly AVIs and MPGs, are converted to MP4s using an exec command in a PHP handler, which can take some time. My main issue is that when the conversion takes too long, Firefox doesn't seem to get any response from the XMLHttpRequest, resulting in a status of 0 and an empty response. The script completes, and the file gets converted, but users don't get any feedback on their upload when this happens. I checked the network tab in Firefox; it shows the request runs for a bit longer even after the conversion is complete, but then I get a "NS_ERROR_NET_RESET". To try to solve this, I've swapped browsers (everything works fine in Chrome and Edge), added an event listener to check for timeouts (which didn't trigger), increased the connection timeout in Firefox to 3600, disabled my adblocker—none of that worked. I've searched everywhere for a solution without luck. Any ideas on what could be causing this issue? I'd appreciate any help!

1 Answer

Answered By TechSavvy99 On

You might want to double-check that 3600 is actually measured in milliseconds; it probably is too low. Adblockers can also mess things up. I've run into that a lot, and I often forget they're active!

VideoUploader87 -

Are you sure it's in milliseconds? I set it to 3600, but it was 90 by default. Requests longer than that seem to work, just not the ones over 5 minutes. I’ll try disabling the adblocker again, but I think I already tried it earlier. Thanks for your suggestion!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.