Search:

10 Top Tips for Optimising Joomla 1.5 for speed

August 3rd, 2011

joomla-logoJoomla! is a fantastic CMS platform that can grow with your needs.  Being an open source system with an ever growing community, Joomla! is going from strength to strength and is being used in more creative ways than ever before.  No matter what type of website you’re looking for Joomla! can handle it.

As Joomla! is molded into the web developers vision using more advanced templates, modules and plugins, it soon becomes a bit of a monster.  Unfortunately that monster is not a speedy one!  The more modules and plugins that are used, the more code is served up to the server, which can start to slow down under the strain.

If the website then becomes popular, or the new development is replacing an old website that already attracts heavy traffic, the results can be disastrous.  In fact, it can result in a blank screen for your visitors.

That doesn’t mean you shouldn’t use Joomla! for successful websites, it simply means you have to plan how you are going to use it and consider several aspects during its build.  To help you do this, I’ve written up a list of checks and optimisation tips that you can use as a basis for your development.

1) Use alternative templates for sections
Joomla! takes a bit of getting your head around.  But once you do, you will soon be sorting your content into sections with categories that contain articles.  The point here is that you don’t need to use one single template for the whole website.  By simply copying your template and creating duplicate versions you can apply style-sheets that are needed for that section only.
This will mean less background images from your style-sheets being loaded each time and therefore less overhead.

This will also mean you have the flexibility of altering the template slightly for various areas of the website, which can be really useful from a users perspective as from a navigational point of view, in a large website, they can intuitively know where they are in the website.

To do this simply duplicate your template and rename the template in the xml file.  Click on the new template name in the Joomla! admin template area and allocate the template to the relevant section.

Make sure you point any links to common css files in the new template to the original.  In your new template you then need to point to your extra css template for aspects within this section only.

2) Use css sprites
When you were taught how to design a website in the old days (I’m sounding old now!), you were told to split up images so that theycss could progressively download to show the user something was happening when they were downloading the page.  This was the time of the 56k modem.
While I would say for small sites that attract few visitors you may as well keep this discipline.  For larger sites with big traffic loads I would seriously recommend you use css sprites.
I’m not going to go into detail on how to use css sprites, here’s some great tutorials, but I will tell you why you should use them.

Every-time a user visits your site, all of the background images in your css along with your on-page images are requested from the server.  All of these HTTP requests use a small amount of your servers cpu and memory to deliver the images back to the user.  By combining your images into single images you are cutting down considerably on the number of HTTP requests, therefore saving your server a lot of work.

One tip I will give you that I didn’t see in the tutorials, is that you need 3 types of css sprites.  One for horizontal gradients, another for vertical gradients and a third for single images.  If you are repeating an image in your css on the x axis, you can’s specify a width of an image and repeat it, you need to use the actual full images width.  Therefore if you have several x axis gradients, if you are using css sprites correctly you will have a 1px wide image that is as high as you need to contain all of your gradients.

3) Remove unnecessary javascript from the template
One of the best functions I found in Joomla! was - if (JRequest::getVar(‘view’)!=‘frontpage’) {} , By being able to define if the user is on the front-page (function also works for section or category) you can specify what loads in your template.
Therefore if your website doesn’t need a certain javascript on your front-page but does on sub pages then use this function to remove the script if the user is on the front page.
Let’s face it, we would all like to think that all users are going to love our websites and trawl through all the pages of it.  But in reality many will only load the front page, so lets not make our server work harder than it has to fetching scripts that are not necessary.

4) Remove Mootools.js, Caption.js and K2.js… if you have k2 installed!
logo-mootoolsAlthough you would think that the above function could be used easily to remove mootools.js from loading in the template file, you would be wrong.  Same applies for K2.js if you have the K2 module installed.
The reason for this, is because these javascript files are loaded onto your template via system plugins.
To remove k2.js you need to go into your k2.php file in your plugins -> system folder and edit the script using the function above.
This will make sure your k2.js doesn’t load on the front page.
Mootools.js and caption.js is loaded by default (mostly because your admin pages uses it), so that requires the following script placing at the top of your template…

//remove mootools.js and caption.js
$headerstuff=$this->getHeadData();
reset($headerstuff['scripts']);
foreach($headerstuff['scripts'] as $key=>$value){
unset($headerstuff['scripts'][$key]);
}
$this->setHeadData($headerstuff);

With Joomla! it’s always worth looking at your page’s source code to see what javascript files are being loaded.  Do this on several pages and see if you can identify the modules or plugins that are loading the javascript.  Many modules will use jquery or mootools which are only needed on the pages that have the module active.

5) Deactivate the modules and plugins your not using
When your building a new site with Joomla! it’s easy to get carried away with all the fantastic modules that are available.  Also, before you find that perfect module to fulfill your objective, you may find yourself installing several modules of the same type.
While this is often fine and won’t cause too many problems, there is often a lot of code being injected into your pages due to these deactivatemodules and plugins remaining active.

Therefore throughout your development, install just one module, plugin ot component at a time,  test the new functionality it is suppose to provide and if it doesn’t fulfill your objective un-install it.  It sounds simple, but this discipline will leave your website in good condition.

If you haven’t done this as you go along.  It pays off to go through the modules you are unsure are in use and deactivate them.  Check this doesn’t disable any functionality you want working on the website and un-install if it’s not in use.

6) Have a dig into the third party modules and plugins you’ve installed
The community surrounding Joomla! is fantastic and it never ceases to amaze me just what people are prepared to give away for Programmingfree.  I understand why, as it is a brilliant feeling seeing your product help others, but some of the Joomla! modules and plugins would be the result of years of hard graft and they’re being offered up for free a lot of the time.

However, as with any open source community, the quality of Joomla! extensions do vary.  Some are very code heavy and can cause your site to slow down.  It’s also worth checking the code of a module for third party extensions that may have been used.  For example I’ve spotted a few modues with google analytics embedded.  The author obviously wants to capture how well the module is doing, but this doesn’t help you at all.  So have a dig around, don’t remove code that breaches any copyright, but make sure you understand exactly what the modules doing.

7) Set your expiry tags
Utilising the users cache can be a really useful way of speeding up your website.  Joomla! allows you to set the cache usage up through the admin panel within Site -> Global Configuration -> System.  Depending on how dynamic your site is you can set up how long the cache should be stored before it is refreshed.sell-by-date

While you may set your cache to refresh ever hour, there will still be many components that won’t refresh this often.  By setting expiry tags you are telling the users cache to keep these items for longer periods.

This will again cut down on those valuable HTTP requests as it will only be the first time a visitor views your site will they have to request every element from the server.

To set this up in apache, mod_expires needs to be switched on in the httpd.conf file.  Then within the vhosts section set which file types you want to set expiry tags for, i.e.

ExpiresByType text/css “now plus 1 months”

Here’s a really good article by Simon Whatley on setting up expiry tags.

8) Not Joomla! specific but… Compress your css and javascript files & optimise your images
It may only shave a few milliseconds off, but everything counts.  Obviously the larger the files the more you will benefit from compressing them.
One recommendation though if your compressing fully, is to save an uncompressed version of your css or javascript files so you can easily update them.

photoshop-19-trick

Compressing images used to simply be part of the web build process, but it’s amazing how many web designers now-a-days are looking over this most fundamental of practices.
Invest in a decent package like Photoshop, save your images for web and carefully pick the image that is as optimised as possible while still looking good.  Remember if your designing for mobile to actually view the images on a mobile!  In many cases you can get away with further compression.

http://www.csscompressor.com/ - CSS compression online
http://jscompress.com/ – Javascript file compression online

9) Download YSlow
While Google offers a speed analyser plugin for Firefox, I would recommend downloading YSlow from Yahoo.  It’s a quality plugin thats been around longer than Google’s and while the almighty Google doesn’t often come second, in this case it does.
YSlow will analyse your page, give you stats and let you see by component where your website is optimised and where it’s falling over.
The grading from A-F is instantly available so you can target the problem areas right away.

10) Use your .htaccess file carefully
Again this is not Joomla! specific, but often Joomla! is chosen as a platform when a website is being redeveloped or if this isn’t the case, for sites that are going to grow considerably over time.
When redeveloping a website, you will almost certainly change the structure of your site, therefore popular pages that are linked to and in search engine index’s all over the web, all of a sudden become unavailable.  This can have catastrophic effects on your rankings, visits and ultimately conversions on your website.

Many people turn to their .htaccess file to set 301 redirects for popular pages.  While I would fully recommend you do for the mostjoomSEF_1 important ones, especially those that you have sent out any marketing material for, for those that are less important, leave them be.
By using Google’s webmaster tools, look for pages that are being linked to form external sites, then using Google analytics look for your most popular pages.  Make sure these are set up as 301 redirects.  But set these up in your httpd.conf file instead of your .htaccess file.  By using the httpd.conf file you are ensuring the redirects are loaded once for the users visit rather than every time the user loads any page.  By entering hundreds of 301’s in your .htaccess file you would be making hundreds of server requests for every user visit.  A site that attracts thousands of visits could soon come to a halt.

The same applies for using the .htaccess file to re-write your pages address’s for SEF urls.  Within the Joomla! Global configuration you can use SEF’s without using the apache mod re-write.

Summary

Hopefully some of these tips will help you speed up your Joomla! installation.  But obviously I’ve not covered everything so if you have any more tips please leave them in the comments below to help other Joomla! users that are feeling that need for speed.

Internet World 2011 – time to reflect

May 28th, 2011

iw_entranceMy last blog was written on an iPad hooked up to my friends mifi on a train whilst  on my way to Internet World 2011 at Earls Court.  The blog described the anticipation of Internet World, the keynotes I looked forward to and the types of agencies I would allow access to my barcoded badge so they could contact me afterwards.

So, did the show live up to my expectation?  Or was it a squid that had only just ventured out of the water?

On entry to the show it struck me that some of the more lavish stands of recent years had been scaled down in an obvious cost cutting excersise.  In fact, I would say the show as a whole had a feeling of being hit by cut backs.  This wasn’t suprising and lets face it, measurement and ROI is bread and butter to these exhibitors so they will be ensuring they spend wisely on their set-up.

The blend of exhibitors is more important than how the stands look and I certainly thought the mix was good.  There didn’t seem to be an overwhealming number of the same type of supplier and the organisers should be congratulated on the floor plan which grouped similar suppliers together.  This meant if you wanted a particular service, such as e-mail marketing tools, then you could compare and contrast easily within just a few steps.

Compared to two/three years ago there was a noticable shift from the majority of stands providing services to help you gain more traffic to your site, to now providing servces and tools to improve content engagement ensuring visitors stay on your site.  I think this mirrored the way the internet is now shaping.  It’s an old saying, but “Content is King”  and we’re seeing more and more that by having good quality unique engaging content on your website is the key to success.  Link farms, sites with shallow content and providers of random syndicated content stuffed with affiliate links is exactly what we want to move away from.  Google’s “Panda” update is certainly looking at these aspects to improve their ranking of sites.

One key aspect of the new Panda update is bounce rate so we need to engage visitors.  Not easy for a site that simply wants you toiw_1 click on an affiliate link.

I’m sure like many other visitors to the show, I was looking for inspiration and insight into the latest innovations the industry had to offer.  While I wasn’t exactly blown away, I was happy to see some neat kit for 3d model imaging and a growth in mobile commerce agencies which again reflects the advancements in this area.

All in all, I was pleased with the suppliers exhibiting.  I even offered up my badge several times for scanning.

Even though I have a premier club pass, the keynotes were as always difficult to get in to.  The Linked In presentation from Laurence Bret-Stern was on the Tuesday so I unfortunately missed what I’m sure was a really interesting presentation.

Many of the Keynotes such as Yann Depoys from ebay, James Kent from Google and Amanda Rosenberg also from the search giant iw_queuewere primarily focused on advertising.  How we can successfully market our websites, products and services online and in the mobile space is important.  However, by now we all know how to set-up campaigns, track their success and measure their ROI.  We know about the real-time tools that are available and the multi-varient testing that’s required.  What we really want to know is about the most successful case studies that have that secret ingredient we’re missing.  I’m not sure if I missed it, but I certainly didn’t see it revealed.

Yahoo’s Jon Myers looked at the future innovations of search.  Although I’m sure there wasn’t a visitor in the keynote that didn’t think this was a bit strange as Yahoo’s future in terms of search can be summed up in one word, “Bing”.  The social aspects pulled in to the presentation were expected and the indexing of quality content a given.  The real “innovations” of search were more down to how we would be searching rather than the way in which we search or how search is presented.  Mobile search is where the real “innovations” will happen.

I found several of the smaller keynotes were actually more interesting and less of a sales pitch for the platforms of the big boys.
The smaller keynotes concentrated on the quality content angle and how we can offer that more unique expereince that will encourage repeat vists.  These keynotes were essential for any new internet start-up or newbie.

Overall Internet World 2011 provided access to some very impressive suppliers that showed how the industry is thriving with new developments that can help content providers make their online offering that bit more special.

When you see how fast this industry is moving compared to others, it’s no wonder online sales and useage is increasing so rapidly.  From 2000-2011 the global use of the internet has grown by 444%.   Internet World showed us why.

Internet world 2011 The anticipation

May 11th, 2011

I’m currently sitting on the train from Leicester to London on my way to Internet world 2011 at earls court. Fortunately a friend has a mifi connection to enable me to while away the time blogging rather than looking over the shoulder of the bloke next to me on his Samsung q330 laptop (ok I did look over his shoulder to check out the model).

I thought I would fire up a quick post on the anticipation of the show and then follow this up over the weekend to see how the actual experience matched. I missed out last year so I’m expecting things to have changed a tad in the time I’ve been away. After all we do work in the fastest moving industry-type there is, don’t we?

The blurb says there’s “Over 300 solution providers and 12,000 visitors, combining five shows in one event, Internet World is the event for digital marketing and online business!”

All very well and good. But as we all know, the fact that suppliers are paying a hefty fee to exhibit at the earls court venue, means we attend these shows armed with the knowledge we are about to be pitched to harder than if we were Peter Jones.

That said some very good contacts can be found. This year I’m especially interested in mobile advertising having launched a new app for the company I work for. I’m also interested in any search providers who can offer up something a little different in terms of trending, profiling and customisation of the end user experience.

The main reason to attend however, is the keynotes. This year Internet world have certainly pulled in some big guns, so it’s worth having a look at a few.

Keynotes:

Brian Mc Bride, UK Managing Director of Amazon’s will be talking about their many successes!
This will certainly be of interest. I’m a loyal amazon customer and have always been impressed with their innovations over the years. They always seem to approach web design and development from the customer angle and as a result have never over complicated things. I’m also an amazon associate, so it will be interesting to see if anything on affiliate marketing is covered.

Semir Mahjoub, President of Ericsson Mobile Services at Ericsson is appearing, so I’m wondering if anything will be mentioned of the recent joint ventures with Microsoft. Something of which I have blogged about in the past.

Rick Kelley , Director for Inside Sales EMEA at Facebook will be presenting. He helps oversee expanding advertising efforts with an emphasis on emerging brands. While I would always look forward to hearing from anyone at Facebook, it’s just a question if will this be a sales pitch?
If I see a live ad published with real-time stats being displayed on click-throughs, I’ll be tempted to walk out. I saw that 2 years ago.

Two more possible sales pitches may come in the form of James Kent, Analytics Research Specialist at Google who measures the impact of display advertising and
Amanda Rosenberg, Business Development Manager at Google who works specifically with mobile ads. As mentioned I am interested in how mobile advertising is developing so I’m hoping this produces some useful insight and isn’t just a pitch for more business.

The one keynote that i am disappointed I wont be able to attend is that from Laurence Bret-Stern, Marketing Director EMEA at LinkedIn. Laurence covered Social Media and the Talent Economy. I’m a real advocate of LinkedIn and believe while many social platforms may come and go, LinkedIn will continue to grow. I just hope the presentation will be made available.

Anyway, here’s hoping it will be a good show!

The most viewed blog post in the world

March 19th, 2011

sheep_followingThere seems to be a common thread in the PR stories spun recently by the tech industry big boys. Microsoft, Nintendo, Apple and virtually all manufacturers of 3D TVs have all come out saying how well their products are selling. It’s strange considering the world economy is only just recovering (slowly) from the crisis we have been experiencing. Consumers still don’t have that disposable income they once did, yet the stories on the wire from the brands behind the latest innovations tell a different story – their products are selling… big time.

The theory here is that of the sheep. People follow. If you tell people everyone is buying something – no one wants to get left behind so they go out an purchase.

Like this blog post! The title suggests this is the most viewed blog post in the world, or at least it will point you to it. That’s probably the reason your reading this now. If it’s good enough for everyone else to read, it’s good enough for you as well.

Let’s have a look at a couple of these stories,

Microsoft has apparently sold more than 10 million Kinect systems for the Xbox 360 to retailers. This was announced by Microsoft on Wednesday and with many of the Kinect units being sold in the first three months of it’s launch it has become the fastest selling consumer device ever. Pretty impressive.
If we disect this story however, we can see this is the number of units sold to retailers not customers. So while the title fastest selling consumer device is true – it’s a tad misleading as in many cases it’s not in consumers hands.kinect
Many people would say that they will be otherwise the retailers wouldn’t have stocked them? But wouldn’t they? Considering how it’s virtually common practice now-days for supply of devices such as the Kinect to be intentionally limited so consumers get the impression of a sought-after-hard-to-get device, making the “want” factor outweigh the “need”.
It appears Microsoft’s approach in this case has been different. They have allowed retailers access to the units, which they have obviously taken up and therefore been able to spin the story of the fastest selling consumer device in history. The result – consumers saying “blimey this Kinect thing must be good… better get one!”.

The next story to hit the press with massive sales figures was from the the closest competitor to Kinect – the Wii.
Nintendo this time – who were masters of limiting supply when they launched the Wii – came out with their PR wizardry stating sales of the Wii have passed 50 million. This makes the Wii the fastest selling games console in history by beating the PS2.
wiiThe fact that the Wii has now been around for almost 5 years for it to reach this figure is obviously not mentioned. Neither is the fact that it took the Nintendo Wii about two years to pass the 10 million sales mark recently touted by the Kinect. But it’s interesting how Nintendo are coming out with this story at the same time as Microsoft’s Kinect release. Although I would say, Microsoft owe a lot to the fact Nintendo opened up the console market to such a wider demographic. This is the real reason so many of these devices are being sold. Ask a serious gamer and they wouldn’t touch the Wii. Although many people would think it immerses the gamer more through the fact they control the game-play through movement, in reality there’s only a couple of good games that really achieve this, one being wii sports which was released with the console.

While you cannot take away the success of the Wii and Kinect, you have to wonder if they really are the “game changers” people are making them out to be.  Or are we being spoon fed a very clever dose of Marketing.

The two inventions have certainly opened up the console market to a new demographic and I think that should be noted as the no.1 achievement of these inventions – not the fact they are selling so many million and this is the reason why they must be good!

Oh, and incase you landed on here thinking this was the most viewed blog post in the world – or it was going to point you to it, then I’m sorry.

Knowing Me Alan Partridge Knowing You Fosters Aha!

November 9th, 2010
Alan

Alan

My favorite comedian of all time, Alan Partridge, is back with a new series called Mid-Morning Matters.  This is obviously fantastic news for me as I thought the days of Coogan playing my favorite character were numbered.

It’s a small shame that the episodes are only 12-13 mins each, but I’m happy enough that I’m getting anything so I’m not going to moan.  What is interesting though is that this is an “Internet Only” show that is brought to us by Fosters.  Yep – Fosters, the famous Aussie Lager which us Brits apparently consume at a rate of 30 pints every second!

I see this as a master-stroke from Fosters, who have launched a new website called “Fosters Funny” here in the UK.  They have managed to persuade a much-loved character to make a come back as well as try something new and innovative.  Not only this, they have also given us a glimpse of how we will all be consuming media in the not-to-distant future.

The video is hosted on YouTube and the website is a very simple blog-style set-up, but it works perfectly for capturing the users attention as well as their details to ensure Fosters know exactly how successful this initiative has been.  The usual social sharing buttons are present, as well as a a community style “send us something funny” request which helps them feed the site.
A few select “Tweets” from hand picked users are displayed and finally a few social style games are available.  Basically it is a very simple interactive social website that has just enough content while still being  easy for Fosters to maintain.

I know from experience that Alan Partridge has a massive following and promotes enough of a “cult” following to be searched for actively online.  My Alan Partridge soundboard attracts a good number of hits a month from people looking online for “Alan Partridge Quotes“.

viz_alantrend

Google Search Trends for Alan Partridge

As we can see from the latest Google trends figures, the search term “Alan Partridge” is enjoying the highest traffic since his hey-day with “Knowing Me, Knowing You” and “I’m Alan Partridge” back in 2004/05.  The difference between now and then though was in 2004/05 it was a TV series influencing peoples online search, rather than solely an Internet “Buzz”.

Fosters have been advertising Alan’s comeback on Facebook, Yahoo and through Google Ads.  So combined with the social sharing aspect the website encourages I’m sure the message has been received by a huge audience of Alan fans.

There is no doubt that Fosters has increased its brand awareness though this campaign.  At time of blogging over 228,000 views, 2,270 “Likes” and 779 comments have been recorded on YouTube in the 4 days it has been online.  The video hosts a pre & post roll sequence of an animated Fosters logo as well as maintains the Fosters logo in the top left corner throughout the episode.  As an episode lasts 12-13mins, this is a long time for almost 1/4million people to be engaged with the brand.

Trend for the search term "Fosters" this year

Trend for the search term "Fosters" this year

Again using Google Trends we can see the search term “Fosters” is also enjoying its highest peak this year, an indication the “Fosters” brand is at the forefront of peoples minds when online.

If brand awareness was the objective with this campaign, Fosters can surely sit back and think it’s a job well done – and that’s after episode 1 of Mid Morning Matters.
If however, it was to sell more pints… Only time will tell.  I’m a Fosters drinker already, although I’m sure like the majority of lager drinkers I have little loyalty towards the brand.  If Fosters isn’t available I certainly wouldn’t leave the pub… I’d just ask for an alternative.  I can’t see that changing because Fosters have resurrected my favorite comedy character.

With that said, I still believe Fosters have come up with a winner in Fosters Funny. As Fosters is my primary choice already I’m probably not their target audience with this campaign. I may be guessing, but I think they will be trying to convert lager drinkers of competing brands or maybe lager drinkers that haven’t really made their mind up even when appoaching the bar. With these consumers in mind, I’m sure consciously or subconsciously they will connect the large red F on the beer tap with what they have seen on the internet while watching Alan. I’m also sure their next four words will be “Pint of Fosters please!”.