Okay, what is Amazon doing? They put all their CSS definitions in the <head>
tag? I can see the purpose of saving requests, but it doesn't seem very dynamic to me.
Any ideas?
Okay, what is Amazon doing? They put all their CSS definitions in the <head>
tag? I can see the purpose of saving requests, but it doesn't seem very dynamic to me.
Any ideas?
The <head>
element is traditionally the place for CSS files because the browser will download the files at the beginning of the request.
For me it makes sense. Amazon is a high traffic website and reducing request is surley a good thing for them.
Why shouldn't it be dynamic? Where is the difference between including the CSS or including it via a link tag.
That's very likely not hard-coded in there. It's probably more dynamic than you think. I don't know what set-up Amazon has, but I'm guessing they're using some sort of templating language to add those styles dynamically.
Putting the css on other place then head will trigger a rerendering of the side in some browsers. So if you put your css at the bottom of the page you get an unstyled page until the css is loaded and then the whole page will be rendered again with the new style rules. http://developer.yahoo.com/performance/rules.html#css_top