Saturday, 4 March 2017

Further Site Optimisations

Further to this post from last year, I have also made the following additional changes to increase the performance of the public facing section of  Golf Predictor:
  1. I have further consolidated the number of style sheets to a single one. This should increase performance by reducing the number of HTTP requests to display pages.
  2. I have removed all unused CSS classes in the one remaining style sheet. This reduced the file size considerably.
  3. I have minimised the remaining CSS to further optimise loading times.
  4. Similarly, I have consolidated the three JQuery/Twitter Bootstrap JavaScript files used on these pages into one file and minimised all the code to optimise loading times. I have also loaded this file asynchronously for an added performance gain.
  5. I have changed the order that the CSS and JavaScript files are loaded for speedier rendering of visible content (more pertinent for mobile users).
  6. I have added expiry dates to these seldom changed CSS and JavaScript files, in addition to the image files used on these pages.
  7. I have removed the keywords metatag from these pages. This is because search engines do not use this for ranking sites any more and some commentators speculate that it may actually hurt a site's ranking.
  8. I have altered the code to reduce the number of HTTP requests needed to display the AJAX text pop-ups on the public facing pages. I plan to remove these pop-ups in the not too distant future, so stay tuned for future developments!
All these changes will make the public facing site perform a little better, particularly for first time visitors (files/pages should be cached thereafter!) and help with its search page ranking. For a small operation competing against the Goliaths of the sports industry, it is very important that Golf Predictor is optimised as much as possible from a search engine ranking perspective. More could be done with the CSS (at the expense of maintainability), but for now, I'll leave it as is.

The files in the member section have not as yet being similarly optimised. These pages are not crawled by search engines and anyone viewing them is by definition less fickle than someone perusing the site home page! In addition, the CSS files for this section change much more often, which causes caching problems if they have an expiry date and are harder to maintain if they need to be minimised after each small update. They may be optimised in the future, but since they are performing perfectly fine as they are, they will remain as they are for now.

I have tested all the public facing pages, but please contact me immediately if you experience any problems. Just another way to make Golf Predictor even better!

No comments: