Here’s a code snippet which will let you rotate multiple banner advertisements for all the ad spaces you have on your HTML pages. I wrote this because I didn’t want to use an ad server and wanted a light weight yet elegant solution. What the below code does is, it creates a SSI variable ‘slot’ which can have possible values of 1-12. Each value corresponds to a 5 second slot. Source this file at the start of your HTML file and then use the slot variable anywhere in your HTML code to rotate data according to time based slots.Continue reading

There’s a website dedicated for open source code in various programming languages to detect mobile browsers. However they didn’t have any code to detect a mobile browser using SSI. Thats what I needed to make the HTML pages on my website mobile friendly. Using the <!--#if expr SSI conditional expression, I wrote up a small code snippet to detect the most common smart phones and set a variable when a mobile phone is detected. I use this variable in other parts of HTML to control what is show and what is not to make it suitable for a mobile browser.Continue reading