Only on Firefox “Loading failed for the [removed] with source”

前端 未结 12 1074
既然无缘
既然无缘 2020-11-30 04:39

I want to integrate Marketo form with my existing website on yii framework. My code works on all the browsers except Firefox.

Excerpt from my code:

          


        
相关标签:
12条回答
  • 2020-11-30 04:55

    I had the same problem (different web app though) with the error message and it turned out to be the MIME-Type for .js files was text/x-js instead of application/javascript due to a duplicate entry in mime.types on the server that was responsible for serving the js files. It seems that this is happening if the header X-Content-Type-Options: nosniff is set, which makes Firefox (and Chrome) block the content of the js files.

    0 讨论(0)
  • 2020-11-30 05:01

    This could also be a simple syntax error. I had a syntax error which threw on FF but not Chrome as follows:

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
            defer
        </script>
    
    0 讨论(0)
  • 2020-11-30 05:03

    I ran into the same issue (exact error message) and after digging for a couple of hours, I found that the content header needs to be set to application/javascript instead of the application/json that I had. After changing that, it now works.

    0 讨论(0)
  • 2020-11-30 05:03

    I had the same issue with firefox, when I searched for a solution I didn't find anything, but then I tried to load the script from a cdn, it worked properly, so I think you should try loading it from a cdn link, I mean if you are trying to load a script that you havn't created. because in my case, when tried to load a script that is mine, it worked and imported successfully, for now I don't know why, but I think there is something in the scripts from network, so just try cdn, you won't lose anything.

    I wish it help you.

    0 讨论(0)
  • 2020-11-30 05:04

    As suggested above, this could possibly be an issue with your browser extensions. Disable all of your extensions including Adblock, and then try again as the code is loading fine in my browser right now (Google Chrome - latest) so it's probably an issue on your end. Also, have you tried a different browser like shudders IE if you have it? Adblock is known to conflict with domain names with track and market in them as a blanket rule. Try using private browsing mode or safe mode.

    0 讨论(0)
  • 2020-11-30 05:04

    Today I ran into the exact same problem while working on a progressive web app (PWA) page and deleting some cache and service worker data for that page from Firefox. The dev console reported that none of the 4 Javascript files on the page would load anymore. The problem persisted in Safe mode, so it was not an add-on issue. The same script files loaded fine from other web pages on the same website. No amount of clearing the Firefox cache or wiping web page data from Firefox would help, nor would rebooting the Windows 10 PC. Chrome all the time worked fine on the problem page. In the end I did a restore of the entire Firefox profile folder from a day-old backup, and the problem was immediately gone, so it was not a problem with my PWA app. Apparently something in Firefox got corrupted.

    0 讨论(0)
提交回复
热议问题