<metaname="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
are examples of CDNs. The purpose of a CDN is to remove the load of static
file requests from web servers that are handling dynamic web content. For
example, if you have an nginx server that handles both static files and
acts as a front for a Green Unicorn WSGI server on a 512 megabyte
virtual private server, the nginx server will run into resource
constraints under heavy traffic. A CDN can remove the need to serve static
assets from that nginx server so it can purely act as a pass through for
requests to the Green Unicorn WSGI server.</p>
<p>CDNs send content responses from data centers with the closest proximity to the requester.</p>
<h2>Static Content Resources</h2>
<ul>
<li>
<p><ahref="http://blog.iambob.me/the-super-stupid-idiots-guide-to-getting-started-with-django-pipeline-and-s3/">The super stupid idiot's guide to getting started with Django, Pipeline, and S3</a>
shows how to host static content on S3 and use those files with Django.</p>
</li>
<li>
<p><ahref="http://blog.doismellburning.co.uk/2012/07/14/using-amazon-s3-to-host-your-django-static-files/">Using Amazon S3 to host your Django static files</a></p>
</li>
<li>
<p><ahref="http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHaveToFallbackFromCDNToLocalJQuery.aspx">CDNs fail, but your scripts don't have to</a></p>
</li>
<li>
<p><ahref="http://django-storages.readthedocs.org/en/latest/">django-storages</a> is
a Django library for managing static and media files on services such as
Amazon S3 and other content delivery networks.</p>
</li>
</ul>
<h2>Static content learning checklist</h2>
<p><iclass="fa fa-check-square-o"></i>
Identify a content delivery network to offload serving static content files
from your local web server. I recommend using Amazon S3 with CloudFront as
it's easy to set up and will scale to high bandwidth demands.</p>
<p><iclass="fa fa-check-square-o"></i>
Update your web application deployment process so updated static files are
uploaded to the CDN. </p>
<p><iclass="fa fa-check-square-o"></i>
Move static content serving from the www subdomain to a static (or similarly
named) subdomain so browsers will load static content in parallel to www
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator