History of HEADSmart
Version 1 | Current version | |
---|---|---|
If one were to look into his default-generated tag, he would find numerous calls to CSS and JavaScript cluttering up and hindering the overall performance of his site. No site is fast enough, in my opinion, so i pondered up a solution to cure the HTTP-request clutter. I call it HEADSmart. The TheorySending one large file has advantages over sending many tiny ones. To achieve a singular CSS file, we can use a PHP file in place of our static CSS. This enables us conditionally parse requested stylesheet information into our document, cache it, and relay it back to the browser.Each package would then need a stylesheet associated with it, featuring all the various styling it depends on. Upon a call to our master PHP-driven CSS file, the appropriate styling is retrieved based on the conditions of the user. Of course, this would include the requested page's associated package. For example, a user requesting the FisheyePackage index page will call a single PHP script for stylesheet information. The PHP script for the stylesheet would grab all the necessary files or data to import. Whether it be stored flat-file or on the database I wouldn't know, but everything is called including the "base" stylesheet, the selected stylesheet for the theme, the layout-gala stylesheet, and anything else which could manage to weasel itself out of inclusion. All definitions can then be parsed into acceptible data which browsers will accept as CSS, and the generated code cleaned up as quickly as possible. Likewise, a single script for JavaScript functions would be called, including browser fixes/stylehacks, etc. Send me a message if you feel like helping in any way. AdvantagesThere are many!
Disadvantages
| If one were to look into his default-generated tag, he would find numerous calls to CSS and JavaScript cluttering up and hindering the overall performance of his site. No site is fast enough, in my opinion, so i pondered up a solution to cure the HTTP-request clutter. I call it HEADSmart. The TheorySending one large file has advantages over sending many tiny ones. To achieve a singular CSS file, we can use a PHP file in place of our static CSS. This enables us conditionally parse requested stylesheet information into our document, cache it, and relay it back to the browser.Each package would then need a stylesheet associated with it, featuring all the various styling it depends on. Upon a call to our master PHP-driven CSS file, the appropriate styling is retrieved based on the conditions of the user. Of course, this would include the requested page's associated package. For example, a user requesting the FisheyePackage index page will call a single PHP script for stylesheet information. The PHP script for the stylesheet would grab all the necessary files or data to import. Whether it be stored flat-file or on the database I wouldn't know, but everything is called including the "base" stylesheet, the selected stylesheet for the theme, the layout-gala stylesheet, and anything else which could manage to weasel itself out of inclusion. All definitions can then be parsed into acceptible data which browsers will accept as CSS, and the generated code cleaned up as quickly as possible. Likewise, a single script for JavaScript functions would be called, including browser fixes/stylehacks, etc. Send me a message if you feel like helping in any way. AdvantagesThere are many!
Disadvantages
|