How would you optimize the code?

Tagged: 

Author Posts

1101blueli

Greetings

Say, I have a group of css only for the product page. Are those css only load on the product page or it is going to load on all my pages. If the latter, is there an ideal way to make those code only load on product pages?
I have around 300+ line css in the MicroTheme. Thinking what is the best practice to optimize those code in order to improve the site performance a bit.

thanks


Sebastian

Hey,

I’m so sorry for the slow reply, I wasn’t getting most forum notifications since switching laptop, so am catching up on everything now.

This is a feature that will be supported in future, where it will be possible to assign MT folders to specific pages. But in the meantime, MT just uses one global stylesheet that loads on each page. Right now I’,m working on some improvements to the targeting options, but will work on that feature afterwards. In the meantime, you can minify the CSS output via MT’s preferences to save some bytes.

I hope that helps, and apologies again for the delay.

Cheers,
Sebastian

You must login or register to reply to this topic.