Internet Explorer intepolation mode for images

Wednesday, February 11, 2009

Filed under: HTML and CSS, web-development — Tags: , , , , — Dmitri @ 15:09

Every self-respecting web-designer and web-developer know that when scaling images browser makes picture smaller or larger by definite “magic” algorithms. All browsers except IE, do that much-less correctly.

In Internet Explorer you should setup that algorithm manually as CSS property.

img { -ms-interpolation-mode:bicubic }

So here is result, screenshot are taken in IE7 with
image scale about 50-60%.

Without algorithm
Bicubic algorithm disabled (default)

Without algorithm
Bicubic algorithm enabled

Read more on MSDN website about this issue.

Enabling interpolation algorithm is useful for any kind of *boxes like Fancy Box, Shadowbox, Light Box, etc…

NB! Enabling algorithms can decrease IE’s performance up 2 times!
Nice joke, BILL!

IE session bug is solved

Thursday, February 5, 2009

Filed under: HTML and CSS, PHP, web-development, work — Tags: , — Dmitri @ 11:07

IE has bug which deletes session data and brakes functionality of website. In other browsers all is working fine.
Here is example in PHP:

<?php
print_r($_SESSION);
//output:
//Array ()
?>

After half day of breaking brain and Google really fantastic solution for this problem, but no one of them didn’t solved our problem. So Mika found that if markup have empty src attribute, IE makes an empty request which breaks session data. So solution is simple check if there any empty src attributes and hrefs in link tag.

Was:
<img src="" alt="An image" id="img" />

You need to remove this empty attribute or if you don’t need this for javascript remove IMG tag at all.
<img src="" alt="An image" id="img" />

That’s really stupid.

© 2008 Dmitri Smirnov