I love WordPress, but I hate it too!
I love WordPress because it is easy to use, install, and configure. I also love WordPress because it is updated 2-3 times a year so I don't worry about it not working with the next version of php or mysql.
I hate it because it is getting fat. This last few weeks I've been busy optimizing my own PHP scripts for better perfomance because i noticed some pages loading slowly. I've even redistributed my mysql tables and optimized mysql database table indexes. I also turned off and deleted many WordPress plugins thinking that work help. Yes, they all did help. Unfortunately they didn't help enough. WordPress too often ends up in my "slow queries" log generated by my shared hosting.
After several months of integration of my php shop scripts with WordPress, I cut the cord! I commented out the include file that loads the Wordpress backend so I could use the Supercache page caching plugin.
I saved around 10-18 queries! I don't know why WordPress needs to do around 10-18 queries (depends on the version) just to let me load a plugin on an external page, but that is what Supercache was showing and I finally decided that it wasn't worth it.
Why did it take me so long to do it? I had to set up my own page caching first. Fortunately there are several php output or page caching script samples online. I tried one and after finding all of the bugs in the script that kept it from working I fixed it up and have it installed and working.
How much faster are external pages loading? Comparing the processing time between the supercached versions of my external pages and the time with my own caching script. Some pages are loading between one third and one sixth of the time it took before while others are loading in about the same amount of time. Page processing time is a good metric, but it isn't precise because it varies according to current server load. If the server is under more load, a script will take a little longer so you have to compare averages.
Another motivating factor in my decision to cut the cord to WordPress on my external pages are the somewhat recent changes to Supercache. I'm sure Donncha has very valid reasons for doing so, but he removed the notice in HTML comments that a cached page was being served, so I couldn't easily tell if the cache was working or not ( often times it didn't appear to be serving the cache even though the files were being created).
Not really being able to tell if the cache was working or not was the straw that broke the camel's back for me. I don't like working on blind faith when it comes to my web hosting and server stability.
Don't you love it when fixing one problem helps solve another? By setting up my own separate cache, I was able to disconnect the WordPress backend and speed up pages. It made me want to do a dance of joy.
What's next in caching? I am thinking about setting up a menu cache for dynamically created menus on the shop category and shop discount pages. If you notice an additional speed up in the next few days on those pages, now you'll know why.
Do you cache your php output or menus? If you haven't already set up caching today!
Showing posts with label optimization. Show all posts
Showing posts with label optimization. Show all posts
Tuesday, February 10, 2009
Tuesday, January 15, 2008
SEO - ALT tags vs Title tags - what are they for?
When should I use ALT and TITLE tags on my websites or blog websites?
Many people want to do SEO, Search Engine Optimization, but they don't put into practice some of the basic tasks that will often benefit greatly. Here is one of them. If you use images on a website and the images are related to the topic of the pages that they are on, you need to add both ALT and TITLE Tags to them, so that the search engines and people using text-based browsers know what they are for.
Alt tags show whatever text that is added to the HTML code when the image doesn't load whether it is corrupt, missing, or if the visitor has a text-based web browser. In Internet Explorer these tags will normally show up as hover text however this use is not covered by standards. When has Microsoft ever followed standards? On web browsers that follow standards, ALT tags correctly show only when an image does not.
It is important that any and all images that are related to your content contain ALT tags, otherwise a visitor will be very confused when an image does not load.
Title tags according to web standards and most web browsers are for hover or tool or tool tip text. The image loads and the text appears when the cursor is over the image. This is very useful for SEO because the search engines, like Google, know what your image is about and use the text like keywords which in the end can bring you more relevant traffic.
Title tags are also very useful because they allow you to add descriptions, or more description, to your images without taking up more space, so you see there is also an educational benefit to adding TITLE tags.
Examples of ALT and TITLE tags
Here are some examples of ALT and TITLE tags used for website images.
Notice Images 1 and 2 contain both ALT and TITLE Text so the information will be viewable on Text-browsers and the description will appear as hover or tool tip text. If you see "relevant ALT text" with your image then your web browser is not standards compliant.
Sample Image 1:
HTML CODE USED:

Sample Image 2:
HTML CODE USED:

Sample Image 3:
HTML CODE USED:

Notice how Image 3 (which doesn't exist) does not load and therefore the ALT text is displayed. Normally, the ALT tag would be the name of the image.
Subscribe to:
Posts (Atom)