Disable Cache in jQuery

I usually run into this problem when dealing with good ol’ Internet Explorer (..any version of IE actually). The problem is that IE tries to be smart and not tell you the new output of a file it fetches more than one time with the same filename, instead it shows Read more…

By Andrew Odendaal, ago

How to break out of an iframe

So someone’s trying to make their site better by opening a page on your site inside of their site using an iframe? They’re doing something like this: [code lang=”html”] [/code] Well how about you stop that from happening by pasting the following line in your website’s header! [code lang=”html”] [/code] Read more…

By Andrew Odendaal, ago

Edit hosts file on Windows 7

The hosts file is used to manually alter the hostname or IP address in place of it being served by a Nameserver, also known as via DNS. The hosts file is located here: [code lang=”bash”] C:\windows\system32\drivers\etc\ [/code] Or an easiler way to get to it incase of whatever is like Read more…

By Andrew Odendaal, ago

Virgin Media blocks torrent sites!

Virgin Media have done it again! They have gone and started a “downloaders war”, I’m sure of it. Basically what happened is that Virgin Media are claiming that they have had an order from the Courts to prevent access to a whole bunch of sites which lead to illegal downloading Read more…

By Andrew Odendaal, ago

DateTime conversion function using PHP

It’s really very simple to convert times in different timezones using the following function. [code lang=”php”] function dateTimeConversion($datetime, $timezone=”Europe/London”) { $date = new DateTime($datetime, new DateTimeZone(“UTC”)); $date->setTimezone($timezone); return $date->format(“Y-m-d H:i:s”); } [/code] As you can see, it takes 2 arguments, $datetime which is a time string and a $timezone which Read more…

By Andrew Odendaal, ago