Speeding up Websites

As many are learning, Google has announced that one of the factors that will improve your SEO performance and, naturally, your user’s experience, is by speeding up your website. At GlobalSpex, we’ve always been cognizant of this but more for our customer’s and their target market rather than search engines. By using CSS, alt tags, image compression in our web design for speed, style, and 509 disability compliance, it seems this might be helpful for optimization as well. But, as always, we are always learning.

So, we are taking additional steps in improving our website’s speed as well as our customer’s. Google suggests installing their speed tool, Page Speed, to help diagnose and suggest ways to compress the site and speed it up.  Below are the areas that Page Speed will review:

  1. Browser Caching – to help with the browser by instructing it to load previously downloaded resources (images, css, html, etc.) from your local disk rather than over the network.
  2. CSS compression – Removing CSS from documents, compression external CSS and removing unused.
  3. JavaScript compression –  minimizing and combining javascript code.
  4. Images – Optimizing and setting dimensions.

So far I’ve compressed our website’s CSS file by removing spaces and extraneous styles. The next suggestion was installing in our .htaccess file with the recommended caching code. (My next post will include this code)

As promised in my previous post, I am including the code we use to cache our website. (I got this from a Google Group discussion.) Further explanation can be found from Google’s help page: https://code.google.com/speed/page-speed/docs/caching.html.

Most web pages include resources that change infrequently, such as CSS files, image files, JavaScript files, and so on. These resources take time to download over the network, which increases the time it takes to load a web page. HTTP caching allows these resources to be saved, or cached, by a browser or proxy. Once a resource is cached, a browser or proxy can refer to the locally cached copy instead of having to download it again on subsequent visits to the web page. Thus caching is a double win: you reduce round-trip time by eliminating numerous HTTP requests for the required resources, and you substantially reduce the total payload size of the responses. Besides leading to a dramatic reduction in page load time for subsequent user visits, enabling caching can also significantly reduce the bandwidth and hosting costs for your site.

Basically, the .htaccess file is telling the bots to cache certain files at various times for returning visitors.

ExpiresActive On
ExpiresDefault A0

<FilesMatch “.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$”>
ExpiresDefault A29030400
Header append Cache-Control “public”
</FilesMatch>

<FilesMatch “.(gif|jpg|jpeg|png|swf)$”>
ExpiresDefault A604800
Header append Cache-Control “public”
</FilesMatch>

<FilesMatch “.(xml|txt|html|js|css)$”>
ExpiresDefault A7200
Header append Cache-Control “proxy-revalidate”
</FilesMatch>

<FilesMatch “.(php|cgi|pl|htm)$”>
ExpiresActive Off
Header set Cache-Control “private, no-cache, no-store, proxy-revalidate, no-transform”
Header set Pragma “no-cache”

</FilesMatch>

Posted in ,

Christina Hawkins

Since 1999, Christina has been designing and building exceptional websites. With many years of experience in creating thousands of websites, she understands the need for continuing education in her field and, therefore, is constantly learning and teaching others about internet marketing and digital processes. Christina has honed her digital marketing and graphic design skills so that she can help B2B industries get their message out to their target audience in the right way. In addition to her ability as a digital marketer, Christina serves as a coach and mentor with WPElevation to other digital marketing freelancers, helping them grow their businesses. She is a sponsor and co-leader of Houston's WordPress Meetup. Recently, she spear-headed the next Houston WordCamp 2020 as its coordinator after a 10 year hiatus and became the Houston Interactive Marketing Association Director of Technology.

Leave a Comment