0

I have just been asked to look at a website and see if there are any ways to improve its Page Load speed.

I have identified that there are a lot of duplicate CSS Entries, across a lot of separate CSS Files. Is there a way I could copy all of the CSS into a single Stylesheet and then enter it into some kind of software etc, which would output all of the Elements such as Buttons, Menu Items and the such? As such, allowing me to use the such an Output as some kind of Checklist in the recreation of a more efficient CSS File?

As an extra benefit, it would be ideal if such software would be able to identify any duplicate entries too. The collective CSS lines are over 150k, so it would take a while to go through this manually.

Unfortunately, the website owner never created a Pattern Library.

2

As an extra benefit, it would be ideal if such software would be able to identify any duplicate entries too.

cssnano and csso are what you're looking for.

1

Believe it or not, your everyday text editor is probably all you need.

  • I've been using TextPad for years. It comes with a tool to "Compare Files" which can automate this daunting task for you. TextPad isn't the only one that can do that.
  • Notepad++ has a downloadable plugin which allows you to find the differences between two files.
  • Diffchecker is an online resource that lets you upload the files you want to process.
  • Code Beautify is much the same thing.

The list goes on and on. Open whatever text editor software came with your system. You might already have your solution.

Not the answer you're looking for? Browse other questions tagged or ask your own question.