Zhongde Liu

This is my personal "Clipboard" of web development stuff I come across


Leave a comment

Code: load handler with cached images and IE

Just had a strange case, that the load event of an image is not fired. After a short research I found the issue…

Not working code:
$('img').attr('src', 'image.jpg').load(function() {
//Do something - but it doesn't
});

Working code:
$('img').load(function() {
//Do something - it does
}).attr('src', 'image.jpg');

The thing is IE (and Opera) will load the cached image directly before your event handler is attached…

It is jQuery Notation but also applies to Vanilla JS.


Leave a comment

Installing is nomally so easy….

…but not always. I tried to install die Kinect SDK and stumbled upon different problems – with just executing the .exe install file:

  1. Install process just brakes with no error message….
  2. ……Finding the setup-log
    • Hit “set TEMP” into the command shell prints your temp folder of your current user
    • Analysing the log points me to “Error 0x800b010e” — …great
  3. After some research on the web I disabled some security settings in advanced options tab of the internet options
  4. ….it is installing a bit longer – but still – error
  5. …. Analysing (again) the log reveals “Error”0x80096005” — great²
  6. Hey there is a magical command found in a post of one of microsofts forum which solves this problem!
    Make sure your machine has cached the certificate revocation list (CRL) for the timestamp countersignature.  You can force this to happen by running the following commands:
    certutil -URLCache -f http://crl.microsoft.com/pki/crl/products/MicrosoftTimeStampPCA.crl 
  7. Viola! – It is installed