I'm trying to build dynamic CSS stylesheet changer, as simple as possible, for Bootstrap / Bootswatch. I've seen many sources, but I found that most examples relies on additional title
attribute of link
tag. And thus, doesn't work in all browsers or works wrong (mainly because of this problem).
I also noticed, that using title
or rel="alternate stylesheet"
isn't perfect idea, as though styles listed this way are "ignored" (not rendered) upon initial page load, they are somehow parsed, making browser unbelievable slow. I've added two or three Bootswatch styles next to default Bootstrap stylesheet and I nearly killed my Chrome, though page was rendered only with default styling.
Can someone show an example of dynamic stylesheet changer or proper use-case of title
and rel="alternate stylesheet"
attribute, that would not consume all my computer resources?