Working with 'data: image/gif;base64, AAAA' and HTTPS
Posted on Sunday, 25 April 2010 23:17Whilst trying to implement Lightbox on our secure SharePoint site, I started getting Mixed content mode errors. After doing a little digging I found out why and how to fix it.
So, we're on an https SharePoint site, and tried implementing the lightbox JavaScript library. It worked well except that in IE we had a mixed-mode content error.
After digging through the css and javascript I narrowed the issue down to the following piece of code:
background-image: url('data:image/gif;base64,AAAA');
Now, it took me a while to work out but what this code actually does is create a transparent background on the fly. If you substitute this for a transparent 1px gif (just google blank.gif, there are millions out there) hosted on your site, the messages will stop.