Saturday, September 02, 2006

AntiAd PAC

Don’t you just hate it when you’re browsing pages and they look like Times Square at night with all those banner ads? Me too. So I wrote AntiAd PAC to deal with this annoyance. Many web browsers (Firefox, IE, Opera, Mozilla, Safari, etc) offer the option of using proxy auto configuration (PAC) scripts in their "proxy server settings". The PAC file script is a javascript which instructs the browser to send the URLs from the browser’s location bar as well as individual href link and content source tags (images/flash animations) through a special function before continuing with fetching of the content which the URL refers to.

In AntiAd PAC, the function checks the URL's domain against a list of sites to block (blacklist) or not to block (whitelist). The whitelisted URL requests are permitted to pass and function normally. The blacklisted URL requests are redirected either to a null address (0.0.0.0 or 127.0.0.1) or they can be redirected to a local “blackhole” proxy server which serves a blank transparent GIF image for all content requests (this prevents the “x” placeholder or other error when blocking content). In addition to explicitly blacklisted sites, regular expressions are used to check against popular ad-server subdomains and folders, so as not to unnecessarily block entire domains and to provide some “future proofing” for the PAC file. The entire checking operation is done without any noticeable delay since the function and subroutines are very small and optimized for speed.

In effect, places on a page where there would be an ad (image, inline-frame, etc.) are blank. For slower internet connections (dial-up or cellphone based) this would speed up individual page loading since all the browser requests for fancy flash based ads which take up a lot of bandwidth would not be processed. In some cases, AntiAd PAC also provides some security against certain malware/adware attacks, such as the recent adware which propagated itself through ads on myspace.com.

> > > Download Here < < <

Be sure to check back often because I will update the PAC file to deal with any new ads and banners that I come across.

0 comments: