CSS and Documents by Eric A. Meyer
Author:Eric A. Meyer [Eric A. Meyer]
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Web / Page Design
ISBN: 9781449342463
Publisher: O'Reilly Media
Published: 2012-09-27T16:00:00+00:00
Warning
Older versions of Internet Explorer for Windows do not ignore any @import directive, even those that come after other rules. Since other browsers do ignore improperly placed @import directives, it is easy to mistakenly place the @import directive incorrectly and thus alter the display in other browsers.
HTTP Linking
There is another, far more obscure way to associate CSS with a document: you can link the two together via HTTP headers.
Under Apache, this can be accomplished by adding a reference to the CSS file in a .htaccess file. For example:
Header add Link "</ui/testing.css>;rel=stylesheet;type=text/css"
This will cause supporting browsers to associate the referenced style sheet with any documents served from under that .htaccess file. The browser will then treat it as if it were a linked style sheet. Alternatively, and probably more efficiently, you can add an equivalent rule to the server’s httpd.conf file:
<Directory /path/to/ /public/html/directory> Header add Link "</ui/testing.css>;rel=stylesheet;type=text/css" </Directory>
The effect is exactly the same in supporting browsers. The only difference is in where you declare the linking.
No doubt you noticed the use of the term “supporting browsers.” As of early 2012, the widely used browsers that support HTTP linking of style sheets are the Firefox family and Opera. That restricts this technique mostly to development environments based on one of those browsers. In that situation, you can use HTTP linking on the test server to mark when you’re on the development site as opposed to the public site. It’s also an interesting way to hide styles from the WebKit and Internet Explorer families, assuming you have a reason to do so.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9929)
The Mikado Method by Ola Ellnestam Daniel Brolund(9793)
Dependency Injection in .NET by Mark Seemann(9350)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7793)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7571)
Svelte with Test-Driven Development by Daniel Irvine(7296)
Test-Driven Development with PHP 8 by Rainier Sarabia(7036)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(6891)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6541)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6429)
Web Development with Django by Ben Shaw Saurabh Badhwar(6353)
React Application Architecture for Production by Alan Alickovic(6074)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5816)
Kotlin in Action by Dmitry Jemerov(5077)
Audition by Ryu Murakami(4595)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4525)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4373)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4323)
Solidity Programming Essentials by Ritesh Modi(4079)
