FLIR:避免丑陋的页面加载
我正在构建一个广泛使用 FLIR 的网站,以允许使用非网络安全字体。然而,页面加载是一个丑陋的过程,因为首先加载每个字段的 HTML 文本版本,然后(几百毫秒后)它被其 FLIR 图像对应物取代。
有什么办法可以避免这种事情吗?几个小时后我就要向客户做演示,我知道这会引起人们的注意。我的情况有点与 这个问题 有关 sIFR,不是FLIR。有什么想法吗?
谢谢,
贾斯汀
I'm building a site that makes extensive use of FLIR to allow the use of non-websafe fonts. However, pageloads are an ugly process, as first the HTML text version of each field loads and then (a few hundred milliseconds later) it's replaced by its FLIR image counterpart.
Is there any way to avoid this sort of thing? I've got a client presentation in a few hours and I know it'll raise eyebrows. My situation is sort of related to this question which is in regards to sIFR, not FLIR. Any ideas?
Thanks,
Justin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将以下规则放入样式表中:
您可能需要修改其他与 FLIR 相关的 CSS 规则,以考虑到生成的图像现在与其各自父级的顶部垂直对齐的事实。
Try putting the following rules into your stylesheet:
You may have to modify your other FLIR-related CSS rules to account for the fact that the generated images are now vertically aligned to the top of their respective parents.
自从我使用 FLIR 以来已经有一段时间了,但我记得有一种内部缓存方法,可以在加载时从缓存中提取而不是每次都生成它。
http://docs.facelift.mawhorter.net/configuration:settings
另外,您页面上不能同时显示太多内容。我发现 6 到 10 之间的性能最佳。
您使用共享主机吗?你的css/js压缩了吗?我发现初始加载有点慢,但生成图像后相当快。
It's been a while since I used FLIR, but I recall there was an internal caching method that would pull from cache on load instead of generate it each time.
http://docs.facelift.mawhorter.net/configuration:settings
Also, you can't have too many on the page at once. I found that between 6-10 were optimal for performance.
Are you on shared hosting? Is your css/js compressed? I found that the initial load was a little slow, but fairly quick after the images had been generated.