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

To Gimp or Not To Gimp

In the world of photo editing, adobe photoshop is king. They really do have an amazing product. It’s sleek, works great, and is very robust sporting dozens and dozens of functions and endless possibilities for the graphic artist.  Photoshop is also very, very expensive. The entire Adobe creative

Domain names other than .com a good idea?

Top Level Domains (TLDs), which are suffixes, are the final part of URLs. Although.com is well-known, there are more than 1,000 TLD choices available; however, not all of them are open to the general public. Prior to TLDs, IP addresses were used to visit websites, however this proved

SEO Update: American Metals

Since SEO is our specialty – we know what it takes to put a website on page 1. When American Metals came to us they were back past page 10 for a lot of their keywords and getting about 50 users per month on average on the website.

Review: Google Chrome – StayFocusd ★★★★★

We. Love. This. Chrome extension. Warning: It’s brutal. Stayfocusd is essentially a task manager, not as in manage what task is next, but keeps you focused on your tasks at hand. It blocks websites that waste your time and keep you distracted through a time limit feature. You

Using Google URL Shortener

It really could not be easier. Google’s URL shortener is certainly the best one out there. https://goo.gl/ Our latest rollout, InfoGopher, uses this extensively. Our unique texting app needs short URLs in order to remain inside text character limits. Anyway, we love it. Google as usual gives you

Why is a short domain name better than a long one?

There are several reasons why a short domain name is generally considered better than a long one: Easier to remember: Short domain names are easier to remember than long ones, which makes it easier for people to find and return to your website. More professional: Short domain names