Unfortunately not everyone is lucky enough to have the latest technology and with mobile internet becoming more and more popular it’s still a very good idea to try to optimise site download time.
- The number of files. The more connections that are made to the webserver the slower things download.
- The speed of the users internet connection. Something I am always very conscious of. As much as it sucks – not everybody is on broadband, and not everyone with a broadband connection can download things at the same speed you can
The script is below…
To make use of the script you would have to set the different properties at the top (content type, file type, base folder and gzip compression). The precautions over file extension and folder location are in place to prevent people from being able to include random files from your site (such as wp-config).
You can then work out your new file url. The filenames should be in a comma separated list without extensions. It should be called something like this…
I should point out that I’m not a security expert so if anybody has any ideas for improving the script then please let me know and I’ll update accordingly.