为什么要从 HTML 页面内部将查询参数传递到图像文件 (/img/button.png?123456789)?
我在 Web 应用程序的 HTML 模板中看到了这一点:
<img alt="mybutton" src="/img/button.png?123456789" />
我不明白的是为什么 ?123456789
会传递到图像文件? (在实际的应用程序中,实际传递的数字似乎是根据用户的会话或唯一 ID 定制的)
I saw this in a HTML template for a web app:
<img alt="mybutton" src="/img/button.png?123456789" />
What I didn't understand was why the ?123456789
would be passed to the image file? (in the actual app, the number that was actually passed seemed to be customized to the user's session or unique id perhaps)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它强制浏览器跳过缓存,并从服务器检索新的副本。
It forces the browser to skip its cache, and retrieve a fresh copy from the server.