贺师俊ID:hax
[修改头像]
103530次访问,排名695(-1)好友1人,关注者5
hax的文章
原创 125 篇
翻译 2 篇
转载 12 篇
评论 128 篇
hax的公告

我回来了……

最近评论
jacksu19:有那么一些人,特别怕有人“太”认真。
一般认真也会被他们认为你“太”认真。
hax:其次,也并不是一定要切换编码。只要你的系统是遵循既有规范的,则可以无缝的整合。
hax:从gb2312切换到utf-8其实并不难,有个几天就可以了。
allskystar:以我现在的公司为例,主要的问题在于,以前已经有几个很大的系统用了gb2312了,现在新的系统用的utf-8,要兼容,如果我对头儿说要花一年时间把以前的几个系统都改成utf-8的,估计会被他从10楼直接扔下去...
hax:哦,qomo终于不用eval啦?
软件项目交易
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
订阅到BlogLines
订阅到Yahoo
订阅到GouGou
订阅到飞鸽
订阅到Rojo
订阅到newsgator
订阅到netvibes
文章分类
收藏
    相册
    blog图片
    More
    sfo正牌blog(RSS)
    个人网站
    我在JavaEye的技术部落格
    我墙外的Blogger
    存档

    原创 VML cache issue

    新一篇: new idea for PIES

    Recently I wrote another png transparency patch for ie6 which use VML instead of AlphaImageLoader.

    AlphaImageLoader have many issues, the most famous one is clickable issue. I also found that it can't be used combined with style.zoom property. And, using AlphaImageLoader filter force to hasLayout which maybe not desired. Finally, It's hard to implement background-repeat and background-position feature.

    So VML have no such limitation maybe a better solution. But VML also have own issues --- poor MS!

    All VML Shape should be set width and height by hand, so to implement no-repeat, repeat-x or repeat-y, I had to dig the width and height of the image. I can't find anyway to fetch such info from VML. So I create dhtml Image object to preload the image, and get its width and height. It seems ok, but one day when I tune the performance of page loading, I found the image has been loaded twice!

    After some testing, I found that VML will not use the cache options built in IE at all. In every session (open a new page), it will read the image even the image has been in cache and not expired. In most case, it will result in http status 304. Though 304 is very small in size, but there are still connections which cost lot, for a pages contains many images, and with a slow network, it will degrade the user experience.

    On the other hand, AlphaImageLoader ignores cache options too, it always use cache even you press ctrl+F5. The only way to update the image is clearing cache first.

    God bless M$! html, filter, vml -- three components, three behaviors.

    About cache, AlphaImageLoader is more acceptable than VML. Because the web developers still have some way to refresh the image (by rename the image) for AlphaImageLoader. On the contrary, there is no way to force VML to respect cache except hack the user's browser (no no i have no interest in writing a browser with ie Trident engine, i'd rather to use Gecko).

    So, what should I do?

     

    Note: all test under IE 6.0 on Windows XP SP2.

    发表于 @ 2006年11月23日 02:04:00|评论(loading...)|编辑

    旧一篇: 以讹传讹

    评论:没有评论。

    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © hax