Skip to content

Commit 18d4fbd

Browse files
authored
Update custom CDN docs to clarify compression changes and remove OutputCompression references
1 parent 368309a commit 18d4fbd

File tree

1 file changed

+23
-71
lines changed

1 file changed

+23
-71
lines changed

controls/scriptmanager/cdn-support/custom-cdn-provider.md

Lines changed: 23 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ position: 1
1212

1313
A custom (especially local) CDN provider is useful in cases where the application runs on an Intranet or the client machines are otherwise restricted from reaching the cloud where the Telerik CDN is hosted.
1414

15-
In case you want to use your own **CDN provider** for hosting the Telerik UI for ASP.NET AJAX script / css files you need to follow the steps below.
15+
If you want to use your own **CDN provider** to host the Telerik UI for ASP.NET AJAX script / css files, follow the steps below.
1616

17-
1. Obtain the **CDN resource package** for your controls version. For example, **Telerik_UI_for_ASP.NET_AJAX_2015_2_826_CDN_Resources.zip**.
17+
1. Obtain the **CDN resource package** for your controls version. For example, **Telerik_UI_for_ASP.NET_AJAX_2025_2_609_CDN_Resources.zip**.
1818

19-
This file is available in [your account](https://www.telerik.com/account) and can be found in the Downloads section where all product files for the UI for for ASP.NET AJAX product are located. The location may vary slightly depending on your subscription.
19+
This file is available in [your account](https://www.telerik.com/account) and can be found in the Downloads section, where all product files for the UI for ASP.NET AJAX product are located. The location may vary slightly depending on your subscription.
2020

2121
2. Extract the archive. The file structure will look like this:
2222
* Scripts
@@ -27,107 +27,59 @@ In case you want to use your own **CDN provider** for hosting the Telerik UI for
2727
* ajaxz/[version]
2828
* ReadMe
2929

30-
The Scripts/**ajaxz** folder contains the **compressed** (**gzipped**) JavaScript files. The Scripts/**ajax** folder contains the **uncompressed** JavaScript files for compatibility with older browsers.
30+
> The **Scripts/ajax** and **Scripts/ajaxz** folders are identical. In earlier versions before 2025 Q1, ajaxz contained gzip-compressed files, and ajax contained uncompressed files for older browsers. Starting with 2025 Q1 (version 2025.1.211), no pre-compressed files are provided. Compression should now be handled by your deployment pipeline or CDN.
3131

32-
3. Copy the content of the Scripts / Skins folder to your CDN host:
32+
4. Copy the content of the Scripts / Skins folder to your CDN host:
3333
* CDN
3434
* ajax/[version]
3535
* ajaxz[version]
36-
37-
Example:
3836

39-
![Image Position](../images/localcdn_structure.png)
40-
41-
42-
4. Using **Uncompressed Resources** in IIS
37+
5. Using **Uncompressed Resources** in IIS
4338
* Enable **Dynamic** and **Static** Compression
4439
* Configure **RadScriptManager** and **RadStyleSheetManager**:
4540

4641
**ASP.NET**
47-
48-
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" OutputCompression="Disabled">
49-
<CdnSettings BaseUrl="http://my.favorite.cdn" BaseSecureUrl="http://my.favorite.cdn" TelerikCdn="Enabled" />
50-
</telerik:RadStyleSheetManager>
51-
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="Disabled">
52-
<CdnSettings BaseUrl="http://my.favorite.cdn" BaseSecureUrl="https://my.favorite.cdn" TelerikCdn="Enabled" />
53-
</telerik:RadScriptManager>
54-
55-
56-
5. Using **Compressed Resources** in IIS
57-
* Disable **Dynamic** and **Static** compression
58-
* Set HTTP headers
59-
* Cache-Control: public, max-age=31536000
60-
* Expires - 1 year from the date of the request, if set dynamically. Far-future date (10 years) if set statically.
61-
* For all files in the Scripts/ajaxz folder: Content-Encoding: gzip
62-
* For .css files in the Skins/ajaxz folder: Content-Encoding: gzip
63-
64-
* Set the **BaseUrl** attribute of the **CdnSettings** property to the domain name of your CDN and TelerikCdn="Enabled":
65-
66-
**ASP.NET**
67-
42+
````ASP.NET
6843
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
6944
<CdnSettings BaseUrl="http://my.favorite.cdn" BaseSecureUrl="https://my.favorite.cdn" TelerikCdn="Enabled" />
7045
</telerik:RadStyleSheetManager>
71-
7246
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
7347
<CdnSettings BaseUrl="http://my.favorite.cdn" BaseSecureUrl="https://my.favorite.cdn" TelerikCdn="Enabled" />
7448
</telerik:RadScriptManager>
49+
````
50+
7551

76-
You can also do it from web.config:
7752

78-
<appsettings>
53+
You can also do it from web.config:
54+
````XML
55+
<appSettings>
7956
<add key="Telerik.ScriptManager.TelerikCdn.BaseUrl" value="http://my.favorite.cdn " />
8057
<add key="Telerik.ScriptManager.TelerikCdn.BaseSecureUrl" value="https://my.favorite.cdn " />
81-
</appsettings>
82-
83-
84-
Final web.config file:
85-
86-
<?xml version="1.0" encoding="UTF-8"?>
87-
<configuration>
88-
<system.webServer>
89-
<rewrite>
90-
<outboundRules>
91-
<rule name="Set Content Encoding header">
92-
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern=".*" />
93-
<conditions>
94-
<add input="{REQUEST_URI}" pattern="\.(css|js)$" />
95-
</conditions>
96-
<action type="Rewrite" value="gzip" />
97-
</rule>
98-
</outboundRules>
99-
</rewrite>
100-
<staticContent>
101-
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:10:15" />
102-
</staticContent>
103-
<urlCompression doStaticCompression="false" doDynamicCompression="false" />
104-
</system.webServer>
105-
</configuration>
58+
</appSettings>
59+
````
60+
10661

10762

10863
Now the HTML output of the scripts tag will be like this:
10964

11065
````HTML
111-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Common/Core.js" type="text/javascript"></script>
112-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Common/jQuery.js" type="text/javascript"></script>
113-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Common/jQueryPlugins.js" type="text/javascript"></script>
114-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Common/Scrolling/ScrollingScripts.js" type="text/javascript"></script>
115-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Common/Navigation/NavigationScripts.js" type="text/javascript"></script>
116-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/Menu/RadMenuScripts.js" type="text/javascript"></script>
117-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/TabStrip/RadTabStripScripts.js" type="text/javascript"></script>
118-
<script src="http://my.favorite.cdn/ajaxz/2015.2.826/ListBox/RadListBoxScripts.js" type="text/javascript"></script>
66+
<script src="http://my.favorite.cdn/ajaxz/2025.2.609/Common/Core.js" type="text/javascript"></script>
67+
<script src="http://my.favorite.cdn/ajaxz/2025.2.609/Common/jQuery.js" type="text/javascript"></script>
68+
<script src="http://my.favorite.cdn/ajaxz/2025.2.609/Common/jQueryPlugins.js" type="text/javascript"></script>
69+
<script src="http://my.favorite.cdn/ajaxz/2025.2.609/Common/Scrolling/ScrollingScripts.js" type="text/javascript"></script>
70+
...
11971
````
12072

12173
# Custom Local CDN Provider
12274

123-
The solution described in the section above is fully applicable also for creating a local CDN. Just copy the `Scripts` and `Skins` folders inside a folder in the root of your application and configure the BaseUrl and BaseSecureUrl to point to the resources folder.
75+
The solution described in the section above is also fully applicable for creating a local CDN. Just copy the `Scripts` and `Skins` folders inside a folder in the root of your application and configure the BaseUrl and BaseSecureUrl to point to the resources folder.
12476

125-
For more detailed instructions check out the Configure Local CDN for Telerik UI for ASP.NET AJAX video:
77+
For more detailed instructions, check out the Configure Local CDN for Telerik UI for ASP.NET AJAX video:
12678

12779
<iframe width="560" height="315" src="https://www.youtube.com/embed/iPcvj7Vl5TM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
12880

12981

130-
>note If you are using non-IIS CDN hosting service configuration might be different.
82+
> If you are using a non-IIS CDN hosting service configuration might be different.
13183
13284
# See Also
13385

0 commit comments

Comments
 (0)