I am building webpapp with a JS framework (InfernoJS based on ReactJS).
I was wonderring how much important is it to load only usefull CSS. In JS Framework website (with angularjs, Reactjs...), you have your CSS for all your routes which is loaded but depending on your page you may only need 20% of your CSS rules on the webpage.
For exemple: You have '/about' with the ComponentA, for the JS Framework website you will load the CSS for ComponentA on the '/home' page as well but in that case that CSS is irrelevant.
I am wonderring if developping code to load only the css of the component display will really improve my performance espacially for SEO.
How the browser handle the unsed CSS? Is it loaded in the memory waiting to find an element on which it can be applied? Is It the same for every browser?
Edit: @Psi partially answer it. I will reformulate it to make it more understandable.
On JS framework base, your page is splited in different components, most of the time, you will have a component Header, Body, Footer.
So if I go on the route '/home' and '/about' the component Header and Footer should be the same but the Body component will change. So for optimization, I am considering to load the CSS for the Header and Footer component every time. However, the CSS loaded should change depending on the route and if I change the route (the page is not reloaded, It is handled by JS), the other Body component will be loaded but I will have the CSS of the Body component of the precedent route. In fact, generally you have the CSS for all your Body Components for every routes of your website.
So you have a lot of unused CSS rules. So should it be interesting to change the CSS loaded by adding and removing a <link> or I will probably consum to much ressource doing it and the browser have a good enough optimization about it?