JavaScript not loading/available from CDN

JavaScript not loading/available from CDN

Jeffrey ZolaJeffrey Zola Posts: 7Questions: 2Answers: 0

I am using DataTables with the Editor in a legacy ASP.NET MVC 5.2 application. It is loading the DataTables scripts and stylesheets from the CDN. I haven't updated the versions since 2022. The app calls out V1.10.25 of the base script, and several other plug ins with versions of that vintage.

Our application is misbehaving for all users in one of our clients' user pools. The symptom is that content that is supposed to be added and removed from the DOM is not being added at all. I saw a number of errors in the JavaScript console, the first of which was "Editor requires DataTables 1.10.20 or newer". V1.10.25 is newer than that, so I assume that the Editor script is not finding what supposed to be loaded from the CDN.

We have no other reports of this problem from any of our other clients or their users.

Have there been reports of the CDN being blocked/black listed by corporate networks?

A Coworker suggested that maybe corporate networks have mechanisms to block outdated or flagged CDN content. Have any of the DataTables scripts been identified as security risks that would flag them as quarantined?

Thanks!

Replies

  • kthorngrenkthorngren Posts: 21,670Questions: 26Answers: 5,017
    edited February 13

    The symptom is that content that is supposed to be added and removed from the DOM is not being added at all.

    I'm not sure what you mean by this. Please provide more details.

    he first of which was "Editor requires DataTables 1.10.20 or newer". V1.10.25 is newer than that, so I assume that the Editor script is not finding what supposed to be loaded from the CDN.

    Sounds like that page isn't loading the required libraries in the proper order. Mkake sure that datatables.js is loaded before editor.js.

    Have there been reports of the CDN being blocked/black listed by corporate networks?

    I don't recall seeing anything like this posted on the forum. If the page is unable to load via CDN then check the URL's and check for network errors using the browser's network inspector tool.

    Can you post a link to a test case showing the errors so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • allanallan Posts: 64,010Questions: 1Answers: 10,554 Site admin

    Yup, I'm not aware of the CDN, and more specifically certain versions of DataTables, being on any block lists, but that's really up to the system admin of each network.

    I'd suggest trying to load the file directly from one of the computers on the pools that is affected. See if it loads or if you get an error.

    Another possibility is that multiple versions of jQuery / DataTables are being loaded on the page. Why that would be different between pools though, I really couldn't say.

    If you can show me a test case that reproduces the error I'd be a lot more able to help.

    Allan

  • Jeffrey ZolaJeffrey Zola Posts: 7Questions: 2Answers: 0

    I cannot post more details because this is part of a complex page within our application. The application is used by all of our clients as well as their internal and external users, but we have this reported problem within the corporate network of this one client. I have limited visibility into what is happening within that client's corporate network, and certainly no control over it.

    It has "worked" for four years every where else, so I do not think there is an issue with load order, loading of multiple versions of scripts, etc.

    I suspect that their network is blocking your CDN. My purpose in posting was to see if there were
    old versions of the DataTables scripts that had been found to contain security risks, etc., and therefore pose risks if they are still used. I don't think this is the problem from the responses here.

    I am looking at how and when to update my application to reference newer versions of the DataTables scripts and stylesheets. At that time, I will also determine if I should serve these myself or continue to use the CDN. The challenge is that the application is nearing the end of its life, and we want to reserve our testing resources for the updated version of the app.

  • Jeffrey ZolaJeffrey Zola Posts: 7Questions: 2Answers: 0

    How do I mark Allan's response as the Answer to this Question, as he indicates that there are no known quarantines of older versions of the DataTables scripts?

  • allanallan Posts: 64,010Questions: 1Answers: 10,554 Site admin

    Your post was opened as a Discussion rather than a Question, so there isn't an option to mark it as answered I'm afraid. That's fine, anyone else reading it will be able to follow it just find I'd think.

    Did you get any more information from the client with the problem?

    Allan

Sign In or Register to comment.