Posts Tagged ‘cache’

How to force the browser to reload CSS and JavaScript files

When editing the CSS and JavaScript of a site, there is a slight chance that the user may get the old versions, which at best will cause a lot of complains and at worst will cost you a lot of lost customers. The reason for this is that browsers cache static content like CSS and JavaScript. However, telling a browser to reload them is not that hard to do. All it takes is a little trick that will force our friendly browsers into thinking that the CSS and JavaScript are dynamic content.

Before we go on, let us take a look at how we specify the CSS and JavaScript to be used within HTML. Normally we have something in the line of:

<link rel="StyleSheet" type="text/css" href="/static/style.css">
<script src="/static/js/script.js" type="text/javascript"></script>

Where style.css and script.js are our files. Naturally CSS files are specified with the href attribute of the link tag, while JavaScript files are included using the script tag. Now, let’s take a look how we can make our browser reload CSS and JavaScript every time:

<link rel="StyleSheet" type="text/css" href="/static/style.css?version=15">
<script src="/static/js/script.js?version=15" type="text/javascript"></script>

“Now what is that “version”?”, you are probably thinking. Well it’s nothing. No really, it does absolutely nothing. You can use ?favouritesite=onlinehowto.net15 if you want. It would have the absolutely same effect.

“But what does it do?”, you are probably thinking. “This looks just like passing GET variables.” Exactly!

The browser cache uses a pretty complicated mechanism, but there is one thing that you should know for sure index.html?version=14 and index.html?version=15 are two different pages for the browsers, therefore it can’t rely on its cache, therefore it must get them again. But what happens on the server side? Well those arguments are ignored by our server and it simply supplies style.css and script.js.

Whatever language, technology, etc. you are using, you always keep a header file which is included pretty much everywhere so changing the version=<number> part after each revision is pretty easy. You can even make it a part of your site’s logic.

In conclusion, this trick may save you a lot of headaches related to cached CSS and JavaScript, and if you believe you may have some issues, we greatly encourage you to use it!

VN:F [1.9.18_1163]
Rating: 10.0/10 (2 votes cast)

How to reset the thumbnail cache in Windows 7

Sometimes, for no obvious reason Windows 7 decides to stop displaying the thumbnails of pictures, videos, etc. Whether it doesn’t display anything or some image that has nothing to do with the given media, it simply happens. So what do we do then? We clear the thumbnail cache. Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

How to make Opera 11 use less memory

Opera 11 is a pretty good browser and I prefer it to Firefox and Google Chrome for many reasons. I will launch into explanations on why Opera is my choice in this article, rather than explain a little trick which will make Opera use les RAM. Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 8.3/10 (3 votes cast)

How to hide which sites you have visited in Windows

Most of the browsers support a Private Browsing mode which allows users to surf anonymously without storing any history of the session. Although this does help you remove some of your Internet tracks it still leaves some information that can be retrieved by someone who knows a thing or two about computers. The thing is that this Private Browsing mode doesn’t delete the DNS cache. This means that, if someone types ipconfig /displaydns in the Command Prompt, he can easily find out the websites you have visited. To take care of that, we will show you how to clear you DNS cache.

First we need to run the Command Prompt in Administrator mode. To do that, open the Start menu, type cmd in the search box:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

How to make Firefox 3 use less memory by limiting the pages it stores in the cache

Many users think that Firefox 3 is way too slow and takes up way too much RAM. Well I partially agree with them. Still, there are certain tweaks that may modify the behavior of Firefox so it will use less memory.
For example, Firefox stores a certain number of pages in its memory (therefore in the RAM) to speed up the Back and Forward features. It is possible to modify that number. This may slow the browsing a little bit, but will limit the memory Firefox uses.

First, open Firefox and open a blank tab. Enter about:config in the Address Bar and press Enter:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

How to make Firefox 3 use less memory by decreasing the memory cache capacity

For long years Firefox has been my favorite browser. Fast, reliable, user-friendly. But Firefox 3 was kind of a disappointment. It uses way too much memory, it’s slow and this really gets on my nerves. Nonetheless, it is the best browser in terms of usability, security and tabbed browsing experience. So I decided to try and tweak it a bit. One of the tweaks I managed to come up with was to decrease the memory cache capacity. This means that the cache stored in the memory of Firefox (and therefore in the RAM) will be decreased as well.

Open Firefox and open a blank tab. Enter about:config in the Address Bar and press Enter:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

How to increase Firefox 3 productivity by decreasing the disk cache capacity

There are many ways to tweak Firefox to atune it to your own PC. Here I will show you how to decrease the disk cache capacity. By doing this you will limit the disk space Firefox uses for cached web pages. This way you may experience a little slower browsing, but an overall increase in Firefox performance.

Open Firefox and open a blank tab. Enter about:config in the Address Bar and press Enter:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

How to Download Flash from Web site

All of us have seen cool Flash animations and videos somewhere in the Internet (Youtube, Google Video, Yahoo! Video, etc.), but when we want to get this Flash, to save locally on hard disk or memory card there is no Save As… option when you click on the Flash.

In the Internet exist many software programs which will extract and download this flash file from webpage for you, but most of then are shareware or with commercial license.

The easiest way to get this Flash file from website is to get the the file from cache folder of your browser. Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)