Adding CSS with HTTP Headers

This is a test page to demonstrate how to add CSS via HTTP headers. This doesn't work in all browsers so you'll have to use Firefox or another compatible browser to test this. View source on the page. You'll notice there's no CSS file linked in the HTML. But if you select an element in your developer tools, you'll see the styles associated with that element in the CSS pane. You'll also see the stylesheet in the HTTP response headers in the Network tab.

< Back to the article