[转载]Caching using PHP/Zend_Cache and MySQL

I like the definition used in Wikipedia: “a cache is a temporary storage area where often accessed data can be stored for quick access”. The idea is to get ‘often accessed data’ from a database and store it in memory (RAM or as a file in your local file system). This is because:

FireFox下jQuery UI Autocomplete在中文输入下的Bug

FireFox下jQuery UI Autocomplete在中文输入下的Bug,主要原因是中文輸入時不會觸發原本在autocomplete 榜定的keydown事件。


我記得之前也是遇到autocomplete 中文輸入法的bug
主要原因是中文輸入時不會觸發原本在autocomplete 榜定的keydown事件。
try this one:
//fixed firefox and ie in IME bug
jQuery('#searchkey').bind( "input.autocomplete", function(){
             $(this).trigger('keydown.autocomplete');
})


转自:[url=http://groups.google.com/group/jquery-/browse_thread/thread/8f34129edc5da55e]http://groups.google.com/group/jquery-/browse_thread/thread/8f34129edc5da55e[/url]

经过修订的图像替换-Revised Image Replacement(翻译)

Plenty of new and interesting revisions to the original Fahrner Image Replacement technique sprouted up in late 2003. This was an attempt to consolidate them. Please note that this page is no longer being maintained.
Requirements: the replacement must solve the screen reader problem, and it must address the "images off, css on" problem. It is also hoped that a solution will be found that reduces the need for empty elements. The successful technique must work in browsers back to 5.x, but as of the time of writing none of these appear to fail so browser support matrices will be spared.

大量新的和有趣的修订原Fahrner图像替换技术于2003年底如雨后春笋般出现。是时候合并这一项技术的时候了。请注意,此页不再被维护。
要求:更换必须解决的屏幕阅读器的问题,它必须解决的“images off, css on”的问题。同时也希望会发现一个解决方案,降低了空元素的需要。成功的技术必须是兼容到IE 5.x,但作为写这些都不时出现失败,让浏览器支持矩阵将难以幸免。

IE6 无法设置selected属性

今天遇到个问题,就是js中设置下拉框选中,在ie7,8下都是好的。但在ie6下却有问题,提示无法设置selected属性。后来上网搜了下,问题解决。

问题原因:下拉框中的option是动态创建的。刚创建好,马上进行调用,就会出现这种问题。

解决办法为:在设置selected时,加个时间延长。即options[i].selected = true;改为

setTimeout(function(){ options[i].selected = true; }, 1); 这样就OK了。

DIV+CSS网页布局中解决页面左右抖动的方法

问题症状及原因分析:
打开网页的一瞬间网页会向左摆一下,进了另一个页面时,网页又会向右摆一下,然后又向左摆回来,如果经常在页面中跳转,会看得头晕。
原因是网页的高度不够时,右边的滚动条是不会出来的,这里网页的宽要加上滚动条的宽,margin:0 auto;时,网页的是居中的,但网页的高能够让浏览器出现滚动条时,这里的网页的宽当然就要减去滚动条的宽了,这时网页就会向左摆一点。

IE6下z-index犯癫不起作用bug的初步研究

一、匆匆带过的概念

关于CSS中层级z-index的定义啊什么的不是本文的重点,不会花费过多篇幅详细讲述。这里就简单带过,z-index伴随着层的概念产生的。网页中,层的概念与photoshop或是flash中层的概念是一致的。熟悉photoshop或是flash的应该知道,层级越高(图层越靠上),越在上面显示,如果层发生重叠,层级高的会覆盖层级低的,如果非透明或半透明,则会遮挡。

在photoshop中,层的高低就是靠手动调的,鼠标拖拽,或是ctrl+]或是ctrl+shift+[快捷键改变层的次序。如下图,鼠标拖移改变层次序的过程中: