Presentation on theme: "EXTERNAL CSS FOR LOAD TIME AND MODULARIZATION Tips and tools for creating modular websites."— Presentation transcript:
EXTERNAL CSS FOR LOAD TIME AND MODULARIZATION Tips and tools for creating modular websites
Why You Should Care CSS allows you to keep style themes similar throughout a site on all pages. Holding your css externally allows a visitor to download the style sheet from a separate server simultaneously to downloading data from you.
Why You Should Care If you run a very busy site that serves many people all at the same time, apache, or whatever web server you use can become overloaded and inundated. This is due to the sheer amount of visitors and requests that happen. Offloading some of these requests by storing your css elsewhere aids your server to keep serving quickly and efficiently
How It Works Really, I meant to choose internal css. I guess I messed up. But heres how you link to an external service for housing your css away from your main site. Amazon.com does it. The name of the server is still amazon, but it is a different server from the cluster where their main site loads. If you go to amazon.com, right click on the page and press view source, you can search for css. That shows you this: http://z-ecx.images- amazon.com/images/G/01/AUIClients/NavAuiAssets- dc70fff419ccb09c3875f29a31cce545c3a51506.min._V2_.css That’s the main source of amazon’s css. It’s the same as every other link, just specify style sheet for it in your header, and the full http / https address to the file to include.
That’s It! That’s all there really is to it. It’s the same for internal css, just instead of the http address, you put in the file path itself. This however, doesn’t offer anything in terms of speed or load benefits, but that’s how it works.