- This topic is empty.
-
AuthorPosts
-
May 31, 2013 at 5:37 am #45255moer2237Member
Just doing some house cleaning & looking forward for the pro’s & con’s.
[master](http://www.mytravel22.com/login/masterstyling1.css “master”)
[secondary](http://www.mytravel22.com/secondarystyling.css “”)
[rbar](http://www.mytravel22.com/rbar2.css “”)
3 css files in one [webpage.](http://www.mytravel22.com/kuala-lumpur-hotels.html “webpage”). Actually I’m trying to avoid redundancy of statement. Or even worse contradiction of statement among the css files.
May 31, 2013 at 9:37 am #137146Paulie_DMember@Hompimpa The only thing you are adding then is an extra http request.
I suspect that the difference in file sizes between adding a ‘global’ and ‘thispage’ css file as opposed a combined file would be minimal.
Have you looked at that?
My guess is that the load weight /time is probably about the same.
May 31, 2013 at 11:29 am #137159Paulie_DMember@Hompimpa I didn’t say you didn’t have a good reason just that the difference in loading is probably the same.
If you are loading a ‘global’ sheet + a ‘page sheet’ it adds an extra request.
Combining the two sheets eliminates the extra request.
However, if you have multiple pages (perhaps each with separate sheet) then the extra request MIGHT be justified because a single combined CSS sheet might be take longer to load than 2 sheets with an extra request.
It’s something one should test.
May 31, 2013 at 11:31 am #137160Paulie_DMemberIn the case of the OP, it looks like they are separate sheets for global page components that should, in an ideal world, be combined into a single css file and just loaded once.
May 31, 2013 at 12:17 pm #137164TheDocMemberI suppose if one of the stylesheets that you’re conditionally loading is like 100KB then you’d have reason to separate them.
As for @moer2237, there’s no way those three files should be separated. If you want, you can have them separated locally but definitely combine (and minify) them during deployment.
June 2, 2013 at 10:59 am #137346Kitty GiraudelParticipant> However, if you have multiple pages (perhaps each with separate sheet) then the extra request MIGHT be justified because a single combined CSS sheet might be take longer to load than 2 sheets with an extra request.
I hardly think so. Once Gzipped, a clean stylesheet is blazingly fast to load.
June 2, 2013 at 11:01 am #137348Paulie_DMemberHence the reason why I qualified my statement with a “might” and suggested
>It’s something one should test.
June 3, 2013 at 5:36 am #137407moer2237MemberThanks all for the comments, really appreciate it.
Paulie_D – Suggestion taken. I’ll lump it up in one file then.
TheDoc – True, it’s far from 100KB. Actually just approx 3KB combine! Should be no loading issues then.
Hompimpa – Definitely some work on the comment separation but it does help on redundancy & contradiction issues.
Cheers!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.