Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Plugins by
is there any plugin like YUI Compressor for Q&A ?

1 Answer

0 votes
selected by
Best answer

I'm assuming you mean something that minifies CSS and JavaScript? I don't know of any existing plugin, but it's probably not suited for that as compression the files through PHP would probably add more overhead than you save from the files being smaller.

The simplest method would be to run the files through a minifier manually. Google's Closure Compiler is one of the best for JS. There are many online CSS minifiers, this one seems fine.

So you'd run your code through there and save the files back to the originals e.g. qa-content/qa-page.js or qa-theme/SnowFlat/qa-styles.css. The only drawback is you ned to redo that each time you update Q2A.

(By the way, the savings you get from minification are quite small - for example minifying qa-page.js saves around 600 bytes, while minifying the SnowFlat CSS saves around 1100 bytes.)

thank you very much you answered all my questions in one answer