Does including of unnecessary CSSs slow down a browser (Chromium, Mobile Safari)?
I mean,
function insert_style_sheet()
{
include "style_sheet.tpl";
}
in every php file. The template file style_sheet.tpl is the following:
<link rel="StyleSheet" type="text/css" href="css/main.css">
<link rel="StyleSheet" type="text/css" href="css/controls.css">
<link rel="StyleSheet" type="text/css" href="css/whatever.css">
Yes, and you can try measuring the differences with a performance analyzer like YSlow. An extra stylesheet or two may have a negligible speed effect, depending on how big it is. Essentially, more stylesheets adds this to the pipeline:
As Paul Irish recently tweeted, “When you’re optimizing performance of your site/app, your priorities are 1. Network connections 2. DOM access 3. Javascript optimizations.”