Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Header Stylesheets

According to this: http://www.w3.org/TR/html4/present/styles.html#h-14.6 I can link stylesheets directly in the http header. In php it would look like this:

header('Link: <http://www.acme.com/corporate.css>; REL=stylesheet');

are there any drawbacks in doing this?

like image 283
Timo Huovinen Avatar asked Nov 11 '11 09:11

Timo Huovinen


2 Answers

The main drawback is that it only works in Firefox and Opera. See http://greenbytes.de/tech/tc/httplink/.

like image 200
Julian Reschke Avatar answered Sep 27 '22 01:09

Julian Reschke


are there any drawbacks in doing this?

Debugging styling issues gets a little harder I guess. You can't directly see from the html source of a page what external styles get included.

like image 37
CodeCaster Avatar answered Sep 24 '22 01:09

CodeCaster