谷歌浏览器不会在 html 中显示某些图像
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9349804/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google chrome won't show some of the images in the html
提问by Optimus
I have the following html
我有以下 html
...
<td>
<img src="/assets/jbe/email_banner_ad.jpg" width="600" height="75" />
</td>
....
But google chrome can't display this image, where firefox does without any problem. Here is the screen shot of the google chrome dev tool.
The file is definitely there and I can access it if I put the full address to the url
但是谷歌浏览器无法显示此图像,而 Firefox 则没有任何问题。这是谷歌浏览器开发工具的屏幕截图。该文件肯定在那里,如果我将完整地址放在 url 中,我就可以访问它
http://example.com/assets/jbe/email_banner_ad.jpg
http://example.com/assets/jbe/email_banner_ad.jpg
回答by Kamil
Almost all browsers have "disable cache" option.
几乎所有浏览器都有“禁用缓存”选项。
Example for Chrome: Run Developer Tools. In bottom right corner there is a gear icon with "Settings" tool tip. Click it. You should find checkbox "Disable cache" option in Network section.
Chrome 示例:运行开发人员工具。在右下角有一个带有“设置”工具提示的齿轮图标。点击它。您应该在网络部分找到复选框“禁用缓存”选项。
Firefox has similar option, also Opera. Im not sure about IE. Google "disable cache in ..." or "permanent disable cache in ...".
Firefox 有类似的选项,Opera 也有。我不确定 IE。谷歌“在……中禁用缓存”或“在……中永久禁用缓存”。
回答by user3860822
If anyone still looks for an answer; I just had the same problem, what I did is just go In Cognito in Google Chrome and see if it works there.
如果有人还在寻找答案;我刚刚遇到了同样的问题,我所做的只是在谷歌浏览器中进入 Cognito,看看它是否在那里工作。
I was trying and trying to get it resolved, while actually there never was a problem, just a cache.
我试图解决它,而实际上从来没有问题,只是一个缓存。
回答by Daniel Silva
I had a similar problem. In my case the page did not show the image but when I click over the broken image it shows me the image ok.
我有一个类似的问题。在我的情况下,页面没有显示图像,但是当我点击损坏的图像时,它显示图像正常。
When I inspected the page with the Developer Tool I saw that the images was inside a link where the href of the link was right but the src of the image was wrong, :).
当我使用开发者工具检查页面时,我看到图像位于一个链接中,其中链接的 href 是正确的,但图像的 src 是错误的,:)。
Courious!
有礼貌!