The solution outlined below is believed to be obsolete & ineffective, but retained for historical interest. Phorm have changed their method of operation to hi-jack image requests. You should encrypt your web communications using SSL.

Javascript Tripwire; Detect Phorm Client Side

This page includes two simple Javascript functions to detect Phorm.

The first function, 'AllCookiesAreBadCookies()' will bounce visitors to your site if any cookies are detected client side. This function is best suited to sites which do not expect to find cookies set; its simple and effective for all Phorm style interference.

The second function, 'AllPhormCookiesAreBadCookies()' will bounce visitors to your site if UID cookies set by Phorm are detected. This function is best suited to sites which do use cookies, but want to detect the presence of a Phorm cookie.

The code has been tested on XP with FF2, IE7, Opera 9, FF3 beta. Your feedback is always welcome (contact me using the contact page).

Set a Test Cookie

Click here to set a UID test cookie, or here to set a Webwise test cookie, then refresh the page and watch what happens. Flush cookies and/or exit your browser when you have finished testing.

Installation

Installation options include placing the code in all your web pages.

If you're familiar with Server Side Includes, or PHP includes, its easy to include into the <head> section of every one of your pages.

For smaller sites, you may need to  manually add the functions in the <head> section of your documents.

Alternatively you could put the functions in an external file, and link to them (view the source of this page to see how its done).

The final step is changing your <body> tags to read

<body onload="javascript:AnyCookieIsABadCookie('http://www.badphorm.co.uk/');">

Download Javascript Tripwire File Here

Download Javascript Tripwire.