About.
How to use the CDN.
Bundles.
Bundling combines or bundles multiple files into a single file. You can create CSS, JavaScript and other bundles. Fewer files means fewer HTTP requests and that can improve first page load performance.
Minification performs a variety of different code optimizations to scripts or css, such as removing unnecessary white space and comments and shortening variable names to one character. Consider the following JavaScript function. Minification is autoenabled for bundles.
Compression can provide faster transmission times between the CDN and client browsers that can accept compressed files. Formats that are compressed:
- application/x-javascript
- text/css
- text/html
- text/javascript
- text/plain
(Portions paraphrased from http://www.asp.net/mvc/overview/performance/bundling-and-minification and https://www.iis.net/configreference/system.webserver/httpcompression)
To access a bundle:
JQuery (currently version 1.10.2)
-
//cdnuc.azureedge.net/bundles/jquery cdn org
- "~/Scripts/jquery-{version}.js"
JQuery.Validate
-
//cdnuc.azureedge.net/bundles/jqueryval cdn org
- "~/Scripts/jquery.validate*"
Moderizr (currently version 2.6.2)
-
//cdnuc.azureedge.net/bundles/modernizr cdn org
Bootstrap (currently version 3.0.0)
-
//cdnuc.azureedge.net/bundles/bootstrap cdn org
- "~/Scripts/bootstrap.js"
- "~/Scripts/respond.js"
Custom Bundles (for example pharmacy)
-
//cdnuc.azureedge.net/bundles/pharm/base/css"
- "~/Scripts/bootstrap.js"
- "~/Scripts/respond.js"
-
//cdnuc.azureedge.net/bundles/pharm/base/css
-
//cdnuc.azureedge.net/bundles/pharm/base/js
-
//cdnuc.azureedge.net/bundles/pharm/slp/css
- "~/pharm/sets/slp/css/*.css"
-
//cdnuc.azureedge.net/bundles/pharm/slp/js
- "~/pharm/sets/slp/js/*.js
Non-bundles items
Images (for example pharmacy)
- //cdnuc.azureedge.net/pharm/assets/images/life.jpg cdn org
What is the difference between azureedge (cdn) and azurewebsites (org)?
- //cdnuc.azureedge.net is the actual CDN replicated, compressed and cached around the world
- //cdnuc.azurewebsites.net is the original source used for replication.
Warnings
CDNs are meant for caching
The CDN pulls from the original source and then caches it for 7 days. It must be manually purged to serve before the 7 day expiration.
The CDN is set to cache every unique URL. So it will will treat //cdnuc.azureedge.net/bundles/pharm/slp/js?1 as different than //cdnuc.azureedge.net/bundles/pharm/slp/js?2