Unit PNG Fix is a great workaround for those projects which require the use of alpha transparency in IE6. As well as being very compact—just over 1KB—it is also very easy to implement. However, using Unit PNG Fix on a secure domain can result in a “This page contains both secure and non–secure items…” error in IE.
Thankfully, this is pretty straightforward to fix…
The error is caused by src=”javascript:void(0)” on line 3 of the unifpngfix.js file and there are two ways to work around this:
- Replace javascript:void(0) with javascript:false;.
- Insert a link to an empty file in place of the javascript:void(0). You should note that this creates an extra server call and is my less favoured solution of the two. You could get around this by using a blank page and have the cache never expire on it as suggested here.
And that’s that!