Forum Moderators: not2easy
From an individual page speed point of view is it better to embed css in the HTML page or have it in an external file? The site uses PHP so I could include the css from a site-wide file.
Is the reduction in the number of http requests worth the loss of caching of an external style sheet from a site wide point of view?
I'd be interested to hear opinions and discuss ideas for improving efficient use of css code.
Cheers
Sid
Over time this balance might also change as your site grows (in number of pages and in CSS filesize)
If you use gzip or compression and you don't have much CSS it may be better to put it in the head. If you don't use compression or have a lot of CSS, you'll probably want to leave the CSS in a separate file so it can be cached.
On this and other high ranking pages and Adwords landing pages I intend to embed cleaned up css. For now other pages will continue with the existing but cleaned up and compressed external css file/s. If evidence comes to light that Google is looking at speed from a site perspective rather than a page perspective I may spend time polishing other pages.
Cheers
Sid
PS Thanks for the congrats! Most of my posts were in the immediate Florida aftermath when I seemed to spend 16 hours a day on the Google forums with the other 8 hours fitfully trying to get to sleep.