doupu3635 2013-08-12 12: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 13: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 Stata链式中介效应代码修改
  • ¥15 latex投稿显示click download
  • ¥15 请问读取环境变量文件失败是什么原因?
  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错