MyBB Community Forums

Full Version: Does Extra css cause website to slow down?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Does adding alot of style in website cause slow down? I noticed some times, that scrolling is not smooth. and some times my pointer moves very slow on website (when it is loading). what is the reason for it?
Yes, you have to optimize your site when creating a theme, using css sprites, js file compressing, and stuff like that.
I am using css 3 effects (shadow, round corners ) buttons hover changes with css not with images. is this the case?
The things you mentioned shouldn't cause the troubles you mentioned in the first post.

But yeah! using LOT of CSS will slow down your site.
CSS files have to be downloaded so a lot of text will make the file larger. I have seen CSS files as big as 20KB and account for 75% of the load time for a website. There are a lot of sites that let you optimize your CSS and you can upload your CSS file and they will format and compress it for you.
honestly, a lot of the problem you mentioned in your post (slow cursor, page scrolling not smooth) sounds more like your computer is lacking resources. May i ask how old is your computer, what cpu do you have, and how much ram?
(2011-08-21, 11:56 AM)Booher Wrote: [ -> ]honestly, a lot of the problem you mentioned in your post (slow cursor, page scrolling not smooth) sounds more like your computer is lacking resources. May i ask how old is your computer, what cpu do you have, and how much ram?

Agreed; with modern computers and internet speeds, today's flashy websites shouldn't be an issue. Of course, there is still a point where websites slow to a crawl if they're absolute junk. Even still though, most browsers cache websites/images/css/javascript so the loading times are reduced further. I personally think it's silly when people go overboard and sacrifice script/markup readability to shave .5kb of whitespace of their css/html files. I'd say in most cases, slow websites occur for one of three reasons:

- Crap hosts
- Crap internet connections
- Crap computers

You have to try pretty hard to make a webpage slow to a crawl; I don't think anyone can do it unintentionally with the exception of using large, uncompressed images. I did notice though, that with older versions of Firefox box-shadow (and in some cases fixed backgrounds) effects did cause the page to lag when scrolling.
Make sure your css is gzip compressed when being served. It will resolve any issues when it comes to the size of the file.
(2011-08-21, 08:52 PM)labrocca Wrote: [ -> ]Make sure your css is gzip compressed when being served. It will resolve any issues when it comes to the size of the file.

I've manually editing and removed extra css from site and now its good. But could you tell me How to make css gizp compressed if it is the global.css ?
It's how your web server is setup.
Pages: 1 2 3