Forum Moderators: not2easy
heavy css styles have been declared at the top of the page, i really wonder why they would like this method?
for example,
1. inpage css is difficult to share -> waste bandwidth
2. broswer can't use multi-thread to download the files -> slow page rendering
anything i missed?
Performance-wise an external CSS file requires another HTTP request and server hit, so for stand-alone, high traffic pages like this, inline styles may be best, fastest option.
generate style by php will be more efficient?
It is often easier for the PHP, but not necessarily for the browser or the server.
I don't think it is especially good programming practice to do it this way, but many programmers, especially those working on large systems, do this kind of thing. It is easier to write their own local code than to look up and use a global tool.
This usually indicates that there is not such a good development support infrastructure. I run a software development shop, so I can attest to how difficult it is to prevent this kind of coding.