Server configuration parameters
The assumption worth mentioning before we start is that I suppose your site is running on an Apache webserver. I suppose the same kind of settings will exist for IIS, but as I don't have any site running on that system, I wasn't able to test it so I won't be able to give any hint on what works best.
Keep sessions alive
First of all, you need to make sure your sessions are kept alive. If you are on shared hosting you can only apply this setting if your provider hasn't done it on the general level. But it's always worth trying.
Adapt the .htaccess file in the root directory of your site with the following extra lines of code:
# ----------------------------------------------------------------------
# Keep connection alive
# ----------------------------------------------------------------------
Header set Connection keep-alive
Enable communication compression
A lot of communication is necessary between your server and your customer before they have all the info you will provide. You can send this info just the way it has to be shown on the customer side, but if you compress the communication then you can have a lot less traffic to be exchanged between the server and the client so for the same information you need less time and bandwidth. In order to be able to exchange the information like this, you have to enable compression on your server for the traffic. As we are working with Joomla, we will for sure need the .php file extension to be compressed, but also all supporting files (like css, js, and maybe even html pages) have to be included.
An important parameter for the Google PageSpeed ranking is that you have to be able to serve both old and new browsers. The old ones don't support compression, while the new ones do. And Google wants you to speed up your pages to serve your content to your customers as fast as possible. In order to be able to serve both kinds of browsers at the same time, you have to use the 'Vary Accept-Encoding' parameter, which you have to put at the same place as where you keep your sessions alive.
In order to enable compression and to respect the problems older browsers can have with compression, you have to add these lines to the .htaccess file
# ----------------------------------------------------------------------
# Enable compression but make sure you can server older browsers too
# by accepting that for these browsers, there won't be any compression
# as they can't handle it
# ----------------------------------------------------------------------
<FilesMatch "\.(js|css|html|htm|php|xml)$">
Header append Vary Accept-Encoding
SetOutputFilter DEFLATE
</FilesMatch>
A final remark: these settings (Header append Vary Accept-Encoding) have to be after a setting which has initiated the Header, otherwise you have to use the 'Header set'. As my first setting is always the keep-alive setting, this isn't any problem in my set up but your preferences may be different.
Cache Control
If specific parts of your page don't change a lot (in most of the cases we will speak about images and movies), you can safely indicate they won't change for some time and so your customer will use the browser cache when accessing your page for a second, third, ... time. This will give a better user experience (faster response time because it will be taken out of the cache of the user's browser) and less bandwidth need for you because the user won't download it again.
The lines you have to add to your .htaccess file are
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 years"
Header append Cache-Control "public"
</FilesMatch>
This way, the default expiration for all kinds of files is from the moment of access by your customer plus 1 year. The Cache-Control "public" means that all proxies between your site server and the customer's browser will also try to keep this part of your page in their cache during 1 year, so they too don't have to go back to your site server when they will have to serve the content to a client asking for it.