Leverage Browser Caching

When a webpage loads on your screen there are a lot of little pieces that have come together to create what you’re seeing. Your logo, other images, style sheets, javascript files are among some of the external resources a webpage might use to render itself on your screen. Generally, each time you load the page, every one of those resources has to be requested again, and served up to render the page.

Enter Leveraging Your Browser Caching.

A cache is a set of stored resources for your webpage/website. It holds those elements (external resources) in the browser so that the next time the page needs to be rendered a separate request does not need to be initiated, the browser already has those elements handy to render up the page for you. This makes pages much faster and increases the quality of the user experience … particularly on mobile. There are a number of different ways to leverage browser caching. Most common is through use of an .htaccess file. This file tells browsers what elements and resources to cache, and for how long. It may look something like the following.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”
</IfModule>
## EXPIRES CACHING ##
 

This would tell the browser to hold on to some elements (images) for a year and other files for a period of 1 month. It is important to note that when caching your external resources you will want to clear that cache when you make any changes to the website. If you don’t, the changes might not be served up when the page is called until the cache expires. For instance, changing a jpeg image on the site with a new one won’t redner for anyone that has a browser recognizing that jpegs are cached for 1 year. After that year, they’ll see the image change.

More Web Design Blog Content

Guardian Association Management Has A New Website

Pleased to introduce the new Guardian Association Management website. This is a clean minimalistic layout that funnels users directly into services and payments pages. Gainesville GAM came to us needing something up in a timely manner, clean, modern, and looked great on mobile. We were happy to oblige.

Authority + Trust + Relevance = Rankings

Here you go – the magic formula for ranking on Google. Yes, Yahoo and Bing still matter … even though the third most searched term on Bing is “Google”  – people trying to get back to Google, but they’re still relevant. It’s just easier to focus on Google

Adding a Fee in Woocommerce

This piggybacks off of a solution I found elsewhere. We modified it to add a single fee for products based on the taxonomy. It comes in handy to categories products and then apply this rule to that category. function action_woocommerce_checkout_calculate_fees( $cart ) { // Initialize $quantity = 0;

SEO is No Big Secret

Really, SEO is not some big secret. Some companies try to pretend it is but you don’t have to be an expert to manage your own SEO. What do you think search engines like Google want? Well, they want what their users’ want. That’s how they get business,

Client Spotlight – Veterans Moving Help

Greg came to us needing a boost in his website traffic. He already had his site running but needs people to be able to find it. We are currently working diligently to make that happen for him. We’ve already made significant progress in his search engine rankings and

Phase 2 of Little Diamond Models is Complete

Phew! It took about 4 months of hard work but we finally finished phase 2 of one of our favorite client’s websites: Little Diamond Models. This is a huge website with a ton of great features. We started this project not even a year ago and it already