问题描述
我最近碰上了sIFR的替代产品,我想知道那些同时拥有sIFR和FLIR经验的人是否可以阐明他们在FLIR方面的经验.
I've recently bumped into facelift, an alternative to sIFR and I was wondering if those who have experience with both sIFR and FLIR could shed some light on their experience with FLIR.
对于尚未了解FLIR如何实现的人,FLIR的工作原理是使用JavaScript从目标元素中提取文本,然后调用使用PHP GD渲染并返回透明PNG图像的PHP应用程序放置为该元素的背景,然后将溢出设置为隐藏,并使用与元素尺寸相等的填充以有效地将文本移出视线.
For those of you who've not yet read about how FLIR does it, FLIR works by taking the text from targeted elements using JavaScript to then make calls to a PHP app that uses PHP's GD to render and return transparent PNG images that get placed as background for the said element, where the overflow is then set to hidden and padding is applied equal to the elements dimensions to effectively push the text out of view.
这是我到目前为止所想的:
This is what I've figured so far:
-
好
- 没有闪光灯(+用于手机)
- FLIR不会破坏版面
- 图片的范围从大约1KB(比如说一个h3句子)到8KB(非常大的标题)
- 好的文档
- 易于实施
- 可定制的选择器
- 对jQuery/prototype/scriptaculous/mooTools的支持
- FLIR已实现缓存
- 浏览器自己缓存图像!
坏
- 无法选择文本
- 从所有来源处理请求(您需要限制FLIR自己仅处理来自您域的请求)
我主要关心的是它的扩展性如何,也就是说,在共享主机上使用GD库要花费多高的成本,有人有经验吗?其次,搜索引擎在知道a)文本没有明确隐藏的情况下对sIFR或FLIR实现有何收获?
My main concerns are about how well does it scale, that is, how expensive is it to work with the GD library on a shared host, does anyone have experience with it?; second, what love do search engines garner for sIFR or FLIR implementations knowing that a) text isn't explicitly hidden b) renders only on a JavaScript engine.
推荐答案
从长远来看,sIFR应该更好地缓存,因为渲染是在客户端从一个Flash电影完成的. Flash文本比图像更像浏览器文本,并且很容易在Flash中设置文本的样式(不同的颜色,字体粗细,链接等).与服务器端图像库渲染的文本相比,您可能更喜欢Flash渲染的文本的质量.另一个优点是您不需要任何服务器端代码.
Over the long term, sIFR should cache better because rendering is done on the client side, from one single Flash movie. Flash text acts more like browser text than an image, and it's easy to style the text within Flash (different colors, font weights, links, etc). You may also prefer the quality of text rendered in Flash, versus that rendered by the server side image library. Another advantage is that you don't need any server side code.
Google表示sIFR是可以的,因为它可以将HTML文本替换为相同的文本,但是呈现方式有所不同.我想说FLIR同样适用.
Google has stated that sIFR is OK, since it's replacing HTML text by the same text, but rendered differently. I'd say the same holds true for FLIR.
这篇关于sIFR或FLIR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!