I have some pages that require extra style sheets that only apply for that specific page.
My headers are embed via EE and I have a question about what would be the best approach for this. The problem is that if I add the CSS to the header it will be loaded on every page on the whole site, which is completely unnecessary as they apply for only 1 page.
The solution I do now is to actually add the style sheet directly in the body but of course this is not valid HTML, as they should be in the between header tags.
Is there a way to pass the style sheet to the header dynamically from my page? This way the style sheet gets loaded in the header correctly but only for this page and not every single page that is loaded?
I know you can pass data wit embed, but Im not sure how this could work in my case. How are you guys handling this? I don´t think you are actually putting all styles for the whole site in the headers if they are not in use as this would cause pages to load slow if you include all styles there, even if some are only used once in some pages and are not global styles.