Skip to content
Advertisement

Amcharts images “304 Not Modified” error

I’m getting 304 error when AMCHARTS images are requested to load.

Odd thing is that it works locally on my PC but doesn’t work in development environment.

  • Checked folder and files permissions > Permissions are all OK
  • Checked PATH > Path is OK
  • Tried absolute paths > Still not working in dev env, yes in my pc

Among trivial things I’ve done just to be sure, I’ve tried setting in amcharts config another img/ path (one that I’m currently using WO problems) with same files and it keeps failing.

Any ideas will be really appreciated.

Advertisement

Answer

Are the images served with the correct mimetype? SVG should be served as image/svg+xml. Since you mentioned Tomcat this might be relevant.

You can also try using PNG images instead by setting svgIcons to false in your makeChart call to see if that works:

var chart = AmCharts.makeChart("chartdiv", {
  svgIcons: false,
  // other config omitted
});
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement