Follow this Blog!

May 2, 2013

f Comment

How Do I Know If My Web Browser Is Using Its Browser Cache to Render a Webpage?

Amazon We hear about browser cache all the time but how do you know if your browser is really using its browser cache to render a webpage? Look in the file system for the browser cache files. Just kidding There's a much simpler way to do it.

Below find your browser among Chrome, Firefox, Internet Explorer.

If you want to know why your browser cache is not working read my post on Why Is My Browser Cache Not Working?
Let's use http://www.mensfashionforless.com/t-shirt.html as the webpage which you are trying to find out if your browser is caching.

When you go to a webpage, if the HTTP response header tells the browser to cache this page, then the browser may cache it. The next time you visit the same page without a hard refresh the browser will render the page immediately from its browser cache, even if you are NOT connected to the internet.
So if you own the web server simply shut it down and refresh the webpage that points to your web server. If you see the webpage rendered fine it must mean your browser is using its browser cache. Otherwise read on.

Google Chrome
If you use Chrome (my version is 26.0.1410.64 m) open its web developer toolbar.

Go to http://www.mensfashionforless.com/t-shirt.html.

Select 'Network' tab; then in the left panel click on the path of the webpage being rendered and in the right panel select 'Headers' tab.

If you see the following it means Chrome is using its browser cache.

Request URL:http://www.mensfashionforless.com/t-shirt.html
Request Method:GET
Status Code:200 OK (from cache)

Otherwise you will also see 'Request Headers' and 'Response Headers' which can be expanded to show you the headers respectively.

A big gotcha is the way you navigate to the page matters. If you hit F5 or click Refresh button you are doing a hard refresh, and Chrome will NEVER use its browser cache.

You need to enter some random URL in the URL text field and press Enter, then enter http://www.mensfashionforless.com/t-shirt.html in the URL text field and press Enter. This gives Chrome a chance to use its browser cache.


Mozilla Firefox, or FF
If you use Firefox (my version is 20.0) open Firebug and select 'Net' tab. Select 'All' tab below.

Go to http://www.mensfashionforless.com/t-shirt.html.

If you don't see GET t-shirt.html in URL column (you may see requests getting other resources) it means Firefox is using its browser cache. Otherwise you'll see GET t-shirt.html in URL column.

Firefox is more lenient than Chrome in that it's easier to give Firefox a chance to use its browser cache. Simply click on the URL text field and press Enter.
Internet Explorer, or IE
If you use IE (my version is 9.0.8112.16421) open the web developer tool bar and select 'Network' tab. Click 'Start capturing'.

Go to http://www.mensfashionforless.com/t-shirt.html.

If you see 304 in the Result column go to detailed view and view the request headers. If you see 'If-Modified-Since' listed in Key column it means IE did not use its browser cache.

Otherwise it means IE used its browser cache to render http://www.mensfashionforless.com/t-shirt.html.

Internet Explorer is more lenient than Chrome in that it's easier to give Internet Explorer a chance to use its browser cache. Simply click on the URL text field and press Enter.

Again if you want to know why your browser cache is not working read my post on Why Is My Browser Cache Not Working?
If you have any questions let me know and I will do my best to help you!
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael