Adriano C R
Adriano C R

Reputation: 747

CSS and loading performance: Does using CSS for things that can be done manually cause performance drawbacks?

What I mean by the question title is for example, let's say I have a really busy homepage and I use tons of CSS to do things like uppercase and lowercase and capitalize SEVERAL blocks of text when those are things that can be done manually with text. And I do it a ton of times on the page. Would that reduce page load performance over simply writing the blocks of text how I want them to appear without using CSS on those blocks of text?

EDIT: Found what I was looking for here: Is CSS text-transform "expensive" thanks to @BenY.

Upvotes: 2

Views: 80

Answers (2)

Chris Herbert
Chris Herbert

Reputation: 6285

When you say you "have a really busy homepage", do you mean traffic-wise? If so, I think you are a little confused about how CSS works. All of the burden is on the client (browser), aside from serving the CSS files themselves.

If you're worried about a performance impact from capitalizing through CSS, don't. That is not going to make any difference. Do whatever is easiest for you.

Upvotes: 0

Raptor
Raptor

Reputation: 54212

Once CSS is loaded, it is cached in user's browser. You can minify CSS to reduce the size of CSS.

In fact, browsers render CSS very fast. You shouldn't worry the CSS performance. However, JavaScript is comparatively slower. You should optimize your JS instead.

Upvotes: 1

Related Questions