JPEG Images not loading in IE11 browser served through apache web server

帅比萌擦擦* 提交于 2019-12-11 17:35:43

问题


I'm using apacher web server to stre the static content (like images, css etc.) with my website. Below is my apache configurations set :

<IfModule mod_expires.c>
  ExpiresActive on
   <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|html)$">
        ExpiresActive On
        ExpiresDefault "access plus 30 minutes"
   </FilesMatch>
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch ".+\.(ico|jpg|jpeg|png|gif|js|css|swf|html|woff)$">
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Content-Type-Options nosniff
  </FilesMatch>
</IfModule>

Please note that the same apache configuration is working in test region, but not working in prod region for same jpeg images.

The cache works well for woff,css, js,png files, but doesnt work for my few jpeg images which are loaded from specific folder for one of the website screen. Any idea why?


回答1:


I think the issue is related with cache. 304 Not Modified means it loads the cache. It indicates that the requested resource has not been modified since the previous transmission, so there is no need to retransmit the requested resource to the client. You could try Ctrl+F5 to hard refresh in IE to see if the picture shows.

In this article, it says that the mod_cache module is the most likely culprit for producing unexpected 304 codes in Apache. Thus, within the configuration file you have open look for a section that checks for the mod_cache.c file. You could refer to the official sample configuration.

After finding this configuration, you could try to comment out the caching section by adding # characters at the start of every line to be commented out (but don't delete anything). Then save the modified configuration file then restart the Apache web server to see if this fixed the problem.



来源:https://stackoverflow.com/questions/57841422/jpeg-images-not-loading-in-ie11-browser-served-through-apache-web-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!