duanlun1955 2009-12-14 03:46
浏览 8

如何缓存来自其他网站的图像

I there a way that i can cache the images coming from other websites? I want to have a local copy of the images using cache in PHP so that the site will load faster.

  • 写回答

1条回答 默认 最新

  • doumou5109 2009-12-14 03:51
    关注

    How do you know that caching the images on your server it's going to load faster? In fact, coming from other websites it's usually going to be faster (considering you're using a good image service) because you're going to Split Components Across Domains. You can of course cache your images and create some rules in your server configuration with subdomains to use parallel downloads, but keeping the images across different good domains avoids you from creating all this additional configuration.

    If you plan to "load faster" your website, unless your images are coming from a slow server, you can ask other advices here and keep your img configuration. If you plan to cache your images for another reason, then we can have a better answer.

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大