我有一个页面发布上传以便(重新)设置图像。图像显示在页面上。
上传帖子完成后,会回复并重定向到原始页面。
img标签说
<img src = GetIcon?id=1234&rand='time in millsec' />
1234是常量,每当提供页面时,服务器端都会生成时间。
图标无法刷新
我在f12诊断网络跟踪中看到提取了图标并且服务器返回了新图像;但浏览器显示旧图像。这发生在ie 9和FF4
上我希望rand会修复它 - 当它不存在时,浏览器根本没有取出图标,所以我向我展示了方式(像往常一样)但它仍然无法正常工作
编辑:
现在有(关于img回复)
Cache-control:no-cache, no-store, must-revalidate
pragma: no-cache
expires:-1
仍然无法正常工作
编辑:ASP.NET MVC
这是F12流程
URL Method Result Type Received Taken Initiator Wait Start Request Response Cache read Gap
/WebRole/Admin/Upload POST 302 text/html 281 B 329 ms click 12312 79 0 250 0 359
http://localhost/WebRole/Admin/Setup GET 200 text/html 2.37 KB 46 ms click 12641 0 46 0 0 313
/WebRole/Content/my.css GET 304 text/css 161 B < 1 ms <link rel="stylesheet"> 12687 0 0 0 0 313
/WebRole/Scripts/jquery-1.5.1.min.js GET 200 application/x-javascript 83.75 KB 16 ms <script> 12687 16 0 0 0 297
/WebRole/Scripts/modernizr-1.7.min.js GET 200 application/x-javascript 9.44 KB 63 ms <script> 12687 16 47 0 0 250
/WebRole/Scripts/jquery.form.js GET 304 application/x-javascript 178 B < 1 ms <script> 12687 0 0 0 0 313
/WebRole/UI/GetIcon?systemID=NC037&rand=129580841455167629 GET 200 image/png 1.03 KB 313 ms <img> 12687 16 281 16 0 0
编辑:这本身就消失了 - 我不知道我改变了什么: - (