Serving static assets
Since our static assets, that is, CSS, JavaScript and image files, are not in version control, they have not been deployed to our Heroku app server.
This is okay, though, as a better option is to serve them via a CDN. In this part of the chapter, we'll set up an account with KeyCDN and serve our static assets from there.
Content distribution networks
When a server receives an incoming HTTP request, it usually responds with one of two types of content: dynamic or static. Dynamic content includes web pages or AJAX responses containing data specific to that request, for example, a web page with user data inserted via Blade.
Static content includes images, JavaScript, and CSS files that do not change between requests. It's inefficient to use a web server for serving static content since it unnecessarily engages the server resources to simply return a file.
A Content Delivery Network (CDN) is a network of servers, usually in different locations around the world, that are optimized...