Nairb wrote:
Advantages one way or the other vs. link rel .css or including style
within style tags in my html file?
It's awkward to do some types of CSS hiding with embedded styles. The
stylesheet cannot be shared between different pages - so you've missed out
on a big bonus when it comes to cachability. The cachability is directly
tied to each page - which will probably reduce the cachability even
further.
I prefer the latter as I can then use PHP in the style arguments and also
still maintain/ use only one file. Is there more to this?
Well yes, external stylesheets are completely separate resources as far as
HTTP is concerned.
Apart from anything else, if all you want to do is run your stylesheets
through PHP, why not just do that?
<link rel="stylesheet" href="/styles/screen.php"...
Of course, the default caching headers that PHP supplies are probably
terrible for most stylesheet uses. What about using a preprocessor or
"funky caching" instead?
--
Jim Dabell