doupu3635 2013-08-12 04:54
浏览 27
已采纳

编码和缓存重力图像是否有任何副作用?

I'm having a comment system which uses gravatar to show user images. I think of caching these images by encoding the resulted image into base64 and storing into memcache.

I'm doing this mainly to avoid querying gravatar often and to avoid load time. So i want to know side effects of using this method both seo and browser wise...

  • 写回答

1条回答 默认 最新

  • dqdes60666 2013-08-12 05:34
    关注

    Ok, so a few points to make here:

    Regarding performance:

    You're likely to see a performance loss here for the following reasons:

    • Browsers will cache the images from Gravatar.com or YourServer.com so anything you do will only affect first load
    • Gravatar.com itself is cached downstream by ISPs so there's a chance you won't even need to pull all the way from the Gravatar servers
    • Gravatar itself has good performance - many large sites use it without performance issues
    • Loading the images from another domain (in this case gravatar.com) will be done in parallel to calls on your local domain by most modern browsers, so you might actually slow things down by adding more calls to your server which are done serially after a certain number of connection slots are taken (8+ depending on your browser).

    It's pretty hard to imagine seeing a performance gain from this. Maybe if you tiled a big collection of gravatar images into one larger png and used CSS to manipulate which ones showed, you'd have fewer server calls and might see a small performance gain, but man that sounds like a huge complexity hit for marginal gains at best.

    Regarding SEO:

    There shouldn't be an SEO issue with this, since search engines won't know that the image you serve locally is actually a Gravatar image. Though I suppose some search engines might consider using Gravatar a bit of a bonus as it could "legitimize" you in some way, though this is entirely speculative and should not be a factor in your decision making.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部