Sometimes you need to cache data, most of the time you'll be wishing you could cache data easily. Server-side data caching is an incredibly complex topic, and one that has a multitude of possible solutions. But a lot of the time you just need a caching system that's simple and works.

To address this issue in a search engine that I am working on, IntraSITE Search, I wrote a very simple and versatile caching system that only requires that your PHP script has disk write access. The code works beautifully and transparently, adding caching to a pre-existing system may only require the addition of 4-5 lines of code!

Read more...

Setting up a menu system is a task that most web-developers / designers have to perform on nearly every project they complete. Choosing the right menu system can have a profound impact on the usability, accessibility and appearance of the project.

Most of the JavaScript based menu systems floating around the web have some major failing. Many of them push a particular look and feel on their users. Most of them force you to use an invalid HTML layout or worse yet, define the menu structure in JavaScript (this means that search engines and people using screen-reader won't be able to access the menu!).

After trying a multitude of different solutions I decided that I should write my own system and implement my recommendations along the way.

Read more...

Although it’s not something that needs to be done commonly, sometimes it can be very useful to be able to retrieve GET parameters from the URL of the current page using JavaScript.

To make life easier I have written a short piece of code that extends the "window.location" object to allow you to retrieve GET parameters using their key name

Read more...

Master style sheets are a big time-saver when you code websites for a living, they also help ensure that you cover all the bases when it comes to styling the less used and often overlook elements. A properly designed style sheet can even reduce the time it take to perform maintenance and updates!

Read more...

Generating Captchas that are easy for a human to read and difficult for a computer to decipher is not the easiest of tasks.

Luckily human nature has given us a tool that we can work with: Pattern Recognition. Humans are very good at recognizing words written in the language that they speak, read, and write on a daily basis. This means that Captchas which contain actual words are much easier to read than others that contain random strings.

If we select the Captcha text from a fairly large word-list then we greatly reduce the chance of a spammer getting the right answer through brute force while still making the Captcha easy to solve for our users. This is very important, because if a user finds your validation technique too annoying they will stop visiting your site.

Read more...

While working on a project for a client a while ago I noticed that whoever had written their CMS hadn’t implemented any sort of access control! This meant that anyone that knew the URL of their management pages could change their live site, without even having to enter a password!

Obviously this needed to be fixed...

Read more...
Results 1 - 6 of 11