This is a migrated thread and some comments may be shown as answers.

Custom CDN Provider

4 Answers 88 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Tarek
Top achievements
Rank 1
Tarek asked on 22 Dec 2013, 09:27 AM

How these operations are translated in web.config file :

Set HTTP headers

  • Cache-Control: public, max-age=31536000

  • Expires - 1 year from the date of the request, if set dynamically. Far-future date (10 years) if set statically.

  • For all files in the Scripts/ajaxz folder: Content-Encoding: gzip

  • For .css files in the Skins/ajaxz folder: Content-Encoding: gzip

4 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 25 Dec 2013, 07:40 AM
Hi Tarek,

Here you could find more information about the caching. Regarding to the compression my advice is it to enable it on the application level.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Eirik H
Top achievements
Rank 2
answered on 08 Apr 2014, 12:12 PM
Hi! What is you recommendation to do this in IIS:

For .css files in the Skins/ajaxz folder: Content-Encoding: gzip
0
Peter Filipov
Telerik team
answered on 09 Apr 2014, 08:06 AM
Hello Erik,

You could use RadCompression or the dynamic compression described in the provided help article.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Eirik H
Top achievements
Rank 2
answered on 09 Apr 2014, 09:08 AM
I'm not sure how that would apply as the files are already compressed, but anyway, we ended up with the following web.config in the ajaxz folder:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
        </staticContent>
        <rewrite>
            <outboundRules>
                <rule name="Set custom HTTP response header">
                    <match serverVariable="RESPONSE_Content_Encoding" pattern=".*" />
                    <conditions>
                        <add input="{REQUEST_URI}" pattern="\.css$|\.js$" />
                    </conditions>
                    <action type="Rewrite" value="gzip"/>
                </rule>
            </outboundRules>
        </rewrite>
    </system.webServer>
</configuration>

Tags
ScriptManager and StyleSheetManager
Asked by
Tarek
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Eirik H
Top achievements
Rank 2
Share this question
or