I am Hack Sparrow
Captain of the Internets.

Archive for August, 2010

How to Generate Compressed XML Sitemaps Using PHP

So you figured your 5 mb-and-growing dynamically generated XML sitemap has been a major bandwidth hog and are scared it might bring your website  on its knees; or maybe you wanna play nice with Google by serving it a fast loading compressed XML sitemap. Whatever be the reason, you are here to find out how to compress your xml sitemap and output it as a .gz file, something like sitemap.xml.gz. Compressed XML Sitemap ...

Disabling the Context Menu using JavaScript

So you would'd like to disable the default context menu that shows up when you rightclick on a webpage? Maybe you are in the process of creating the latest and the shiniest web app with its own custom context menu. Here's how to do it. Just add this piece of inline JavaScript code to the HTML body tag of your webpage. [code] ...