【发布时间】:2021-03-27 19:22:54
【问题描述】:
我在我的项目中有两件事要完成,第一件事是隐藏图像路径,这是通过使用参数从 imageConvert.php 动态加载图像(imageJPEG)来完成的,第二件事是我需要实现客户端侧浏览器缓存,为此我使用的是
<link rel='subresource'>
之前(使用普通图像路径),但它不适用于动态图像加载。有没有人可以解决这个问题。
echo "<img class='lazy' src='imageConvert.php?raw=$image&cap=ps&hash=$user_id' />";
echo '<link rel="subresource" href="imageConvert.php?raw=$image&cap=ps&hash=$user_id" as="image">';
提前致谢。
【问题讨论】:
标签: php html caching browser-cache subresource-integrity