Currently browsing

February 2011

Clear Ubuntu Filesystem Memory cache

sudo sh -c “sync; echo 3 > /proc/sys/vm/drop_caches” or sync; echo 3 > /proc/sys/vm/drop_caches   run in the Root Terminal this worked for me on 10.04 There are actually two things you can clear, and they’re both read caches. Write caching is a different thing entirely, and is referred to as …

Simple Ajax code

Simple Ajax Example Ajax is the method of using Javascript, DHTML and the XMLHttpRequest object to perform a GET or POST and return a result without reloading the HTML page. Below is a very simple Ajax example that calls a CGI script that prints out the word sent to the …

Setting A Cookie via Javascript

Scripts — Javascript Cookie Script Here’s a basic Javascript cookie script, it’s from the public domain one, unfortunately we can’t remember it’s source, if anyone knows it, we’ll add that to the script header. This code is provided as is, but has been tested extensively over the years, and should …