Displaying pages using CDN from the hard disk (file:///D:/directory...")

Displaying pages using CDN from the hard disk (file:///D:/directory...")

ma_robergema_roberge Posts: 31Questions: 10Answers: 1

I thought that I could use the Content Delivery Network (cdn) format, but it seems that one cannot use this method if one wishes to display the html files directly from the hard disk (local version of a site), in which case the URL reads "file:///D:/directory/.../filename.htm". In such cases, the browser simply spins its wheels. I had to install the full set of files to sidestep the problem. Is there a way to run DataTables locally when using CDN?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    You can use the CDN with a local file, just make you use http:// or https:// as the protocol to load the file. // on its own won't work since that tells the browser to use the current protocol.

    Allan

  • ma_robergema_roberge Posts: 31Questions: 10Answers: 1

    Allan,

    Thank you very much for your very swift reply. Obviously, I had tried this, but for some reason it had failed to work. I now have more experience with DataTables and have solved the problem.

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    For reference and anyone else who finds this post for a search, what was your fix?

    Allan

  • ma_robergema_roberge Posts: 31Questions: 10Answers: 1

    Allan,

    Well, I followed your advice and made sure to include the protocol, as follows: <script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.7/js/jquery.dataTables.js"></script> (same thing for the other calls).

    P.S. I formatted the framing angle brackets because it seemed the only way to display the entire command.

This discussion has been closed.