Xpath is apowerful method available in php to select specific elemts in the DOM structure of any xml document, and also html document. The code below can be used for example to check for back links, in a robust way. The code below allows for back links to any page or subpage on your domain, but can easily be changed to be more discriminating.
Continue Reading »
Popularity: 2% [?]
Just a quick note on an interesting test I have done on AdSense content targeting. Simply put, I uploaded a number of copies of a html document with some text about DVD-players (in Swedish), altering only the <title></title> and the file name of the documents. A 250 x 250 AdSense unit were also included.
The results are interesting to say the least. From this simple test it seems that in this particular instance AdSense relies entirely on the filename / URL alone to determine content targeting. If the file is called world_of_warcraft_guide.htm, then ads about World or Warcraft would show, regardless of page title and page content (see images below).


Continue Reading »
Popularity: 4% [?]
Masked passwords pose a significant useability issue which can be avoided. Masked passwords often lead to user frustration and possibly encourage users to chose simple passwords that are easy to enter without making mistakes.
Further, the security benefits from masked passwords are likely minimal for most users and applications. However, there are situations and applications that legitimately benefits from masked password fields, and to cover all bases that best solution might be to enable the user to decide wether masking is warranted or not.
This can be achieved with a simple javascript toggle function:
Continue Reading »
Popularity: 5% [?]
With the relatively new 3.5+ release comes a new Geolocation API that enables geographical positioning of the browser client. Positioning is done through an array of means:
“Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs”
This functionality was earlier available through 3rd part solutions such as Google Gears, but now it is natively supported in Firefox.
The key function is: navigator.geolocation.getCurrentPosition()
If you have Firefox 3.5+ you may test the Geolocation API here (please let me know if the result is correct).
Continue Reading »
Popularity: 5% [?]