Referring Kendo UI internal builds from a CDN
Environment
Product | Progress® Telerik® UI for UI for ASP.NET Core |
Description
How can I refer Kendo UI internal builds from a CDN if the official Kendo CDN provides only official releases? I need these internal builds for my Telerik UI for ASP.NET Core project.
Solution
The internal Kendo UI builds are not uploaded to CDN because they are reserved for clients with a commercial license. Only major Kendo UI releases and service packs are available on the CDN servers.
For access to internal builds over CDN, use private CDN services. Always implement a local fallback when you use any kind of CDN. For more information, refer to Scott Hanselman's blog post Fallback from CDN to Local Scripts.
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Kendo UI</title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/10.0.1/default/default-main.css" />
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script>
if (typeof jQuery == "undefined") {
// A fallback to the local jQuery.
document.write(decodeURIComponent('%3Cscript src="/path/to/local/jquery.min.js" %3E%3C/script%3E'));
}
</script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.all.min.js"></script>
<script>
if (typeof kendo == "undefined") {
// Checking for loaded CSS files is cumbersome.
// Therefore, assume that if the scripts have failed, so have the stylesheets.
// A fallback to the local Kendo UI stylesheets.
document.write(decodeURIComponent('%3Clink rel="stylesheet" href="/path/to/local/default-main.css" %3C/%3E'));
// A fallback to the local Kendo UI scripts.
document.write(decodeURIComponent('%3Cscript src="/path/to/local/kendo.all.min.js" %3E%3C/script%3E'));
// Also, add kendo.aspnetmvc.min.js or kendo.timezones.min.js if needed.
}
</script>
</head>
<body>
Hello world!
</body>
</html>