Hi,
one my other website energies2demain.com I use a bunch of plugins to improve the behavior of WordPress.
One of them is WP-Slimbox2 which allow to display a nice lightbox when the visitor click on a picture.
This plugin is great but it decrease the performance of the website, but we can correct that.
First, what cause the problems : too many files need to be load :
- One css file : plugins/wp-slimbox2/slimbox2.css
- one Javascript file : plugins/wp-slimbox2/javascript/slimbox2.js
- an other Javacript file : plugins/wp-slimbox2/javascript/slimbox2_autoload.js
- 3 images to make the button to close, next and previous
To simply decrease the number of file to download, I simply put them in the template of my theme : I took the output of the javacript from firebug and put them in the bottom of footer.php . Same thing with the css in the main css file from the theme. For the picture, well, I didn’t figure yet :p .
One big big problem with this solution : after the update of the plugin, every thing is lost. Moreover, the “mess” you put in all the files are still here.
So I’m going to write a very light plugin to do a lightbox in jQuery. This plugin will have no option, no configuration and no image to control, no installation. Basically, is going to be only a Javascript snippet that you will have to insert in the footer of your theme.
Performance of thomas-genin.com
While I was writing my previous post I realize that I haven’t really optimize this website. I worked a lot to improve the speed of http://energies2demain.com but I did nothing for this one.
And for someone who tried to sale him-self as a “web-optimizer” it is not something to be proud of. So I’m going to optimize it. But first I want to share and save what is the current performance state. This is going to be useful for people who want to see how much we can improve performance.
Continue reading →