Posted at 17:45h
I found this article interesting with some good tips on improving site performance!
, Web Development
Have you ever thought about how many customers you lose by having a slow site? And I’m not talking about file size only, as we rely on browser capacities to understand our code, we need to consider the processing time also.
That’s why sometimes adding a few bites in your code is much better because it save you precious seconds when real browsers or IE try to process your code.
Let’s see a few nice tips on how to improve this:
1. Don’t repeat yourself
You should use the cascade and avoid repeating code. It’s more than just using common classes, you could make good use of the heritance, for instance, so properties that can be set in the parent should be left there. Also you could use the same set of properties for multiple elements (separating multiple selectors using commas, you know).
Also, in your JS make good use of objects, functions and plugins so you don’t need to repeat code.