Forum Moderators: not2easy
Line 1, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"
<html><head><meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"><
Line 1, column 141: required attribute "TYPE" not specified
...</title><style><!--
Line 36, column 1479: end tag for "FORM" omitted, but its declaration does not permit this
Now how long would it actually take for them to fix? Not very long I imagine.
Why do very large and active sites like Google, not use external CSS files?
Because, fairly evidently, the company doesn't generally understand web-design best practices.
Last summer when Google put out the code for its AdSense Search box it was a complete mash of deprecated html 4.01 and xhtml.
You can't expect a company which can't even write code to do sensible things like having global external stylesheets, can you?
Putting together pages or code is not Google's forte. Leave the company alone, Brett >;->
And if you don't rely on IE when you design, then you can go and fix what needs to be fixed within IE.
Just my opinion here, as I am learning this and have put tons of hours into self teaching. So as any good student would be, and should be, am anxious to see what replies my post brings forth ;)
In regards to why google doesn't use CSS, it would be interesting to hear the answer to this question.
What I do with my templates as I build them is to remove the css to see how the page views, if it makes sense, then I feel that those in the minority are getting the page with a sensible view. Just not styled.
I have not come to any conclusions as to how I feel about posting a best viewed with statment on my pages.
Not sure that looks very professional or not? (more of a question then a statment) ;)
Google and other sites are all about speed. External CSS files slow down page loads.
that might be part of it (but no-one has yet proved speed to be a major factor beyond inital page load and I presume most folks have got over their inital page load/first impression with Google ;)) and besides it would likely only be perceptible with a very large stylesheets, which Google wouldn't be anyways..
but here's another take ~ if there's a large amount of CSS to be served it would make sense to at least to put the "core/global" CSS into an external sheet.
I undertand that in a large company different people/page authors will be responsible for different sections of large site ~ so some page pertinent CSS (special classes) might be better off embedded in the head, especially things that can't affect the global layout/theme of a site.
But how would it be if you went to one section of your themed site only to find the team there had changed the entire page font-family to "comic" ~ even say by accident?
If you have the main/global stylesheet held externally and not give individual editors access to it you can keep control of your theme/brand layout
There's more than just speed to take into account here, that amount of CSS would hardly be a drag on anyones server, especially if they removed all the unneccessary bits ;)
And all they're doing by putting it all in the head is removing the benefit of making global changes quickly..
are there any other large sites using CSS with (all) their CSS embedded?
[yahoo.com...] - inline styles
[search.yahoo.com...] - inline styles
[yahoo.com...] - inline styles
Of course, the above pages are unique in style from other Yahoo pages, so there's no point in using an external stylesheet when there are no shared styles. If you look at the Yahoo directory there are many identically-styled pages, and there is an external stylesheet:
[dir.yahoo.com...]
Also, see Microsoft Search Beta (an excellent CSS-driven site):
[beta.search.msn.com...]
Front and results pages use an external stylesheet linked with @import.
Brett's initial hypothesis is not correct: big sites are using CSS, and are also using external stylesheets in appropriate cases.
External CSS files can be slightly bigger than using internal styles, but only the frst time a page is loaded from a site. After that - unless a separate external css file is used for each page, which defeats the purpose - the css does not need to be downloaded again. The total download cost is therefore less than any other solution.
My money is on ronin's explanation.
[edited]SuzyUK and enclyo type faster than me! This was in reply to Lord Majestic[/edited]
My thinking is along slightly different lines and one I have come across numerous times in my limited experience.
When I meet with the executive who has responsibility for a web site, I always ask them if they have developed a guidebook for their site. It is rare that they have a guidebook--rarer still that it is current.
What I usually hear is a sorted tale about the various people that have worked for them and how the mess of a web site grew.
I think they get to the point that they are happy that they have a web site that works (forget validation) and that people come to it.
In short their view is, "Don't fix if it ain't broken."
> using external CSS would generate an extra
> request to their site
Which would slow down page requests and over load servers.
> cached
Most of the major broadband ISP's in the United States have default software that disables browser caching. Ever notice that you have massive extra page views from comcast and road runner? Thats from people that used that default software and/or did not know how to re-enable caching in the browser.
Agreed, there are still benifits from external CSS in a high page view environ as most browsers will cache (even if not between sessions).
On the markup side, there's no point using xhtml or pursuing markup perfection for Google. All their data is in a database and with API's for data access, so the ability to parse pages to extract data is not required (and possibly from a corporate POV to be discouraged). So Google can just focus on making browser-compatible pages.
IMHO Google is sharp enough to develop their own best practices through RW testing, which may or may not tally with the W3C's advice. They don't need the W3C's broad, one-size-fits-all web site design advice, they've got the expertise and resources to determine optimum design for their specific requirements.
If you have the main/global stylesheet held externally and not give individual editors access to it you can keep control of your theme/brand layout
Or just write a simple system that manages the styles in one place and inserts them into the relevant templates. Managing and controlling access to style data (or any other kind of data) does not require using a single text file, especially in an organisation like Google with extensive tech know-how.
But given that William of Occam said (quite perceptively) that one should not make more assumptions than the minimum needed...
... I would guess that the reason Google hasn't put its styles in an external CSS file is not so much because keeping them inline speeds things up, but because this is how it was done originally and it hasn't ever noticeably slowed things down.
Until it does, it's not going to be a priority for the company.