0

So, I'm not sure what the problem here is but I suspect it might be the server. So here's some key details

  • Amazon EC2 servers (All in the same region and zone)
  • Ubuntu 12.04 server
  • Apache2 with gzip compression on all the relevant file extensions
  • Serving files from a connected NFSv4 mount
  • Requests are being made using XMLHttpRequest. The callback is in request.onload

So the issue is given the exact same GET request a file will sometimes be available and sometimes not. It's possible it's also some weird local browser caching issue but I want to rule out the server possibly being at fault.

When I check this with the Chrome console, I basically get this enter image description here

As you can see, the file size will be different randomly, leading me to believe it's only partially loading the file or only part of the file is being served for some reason.

Should the callback be changed to request.onloadend?

Is the server perhaps chunking the file (I made it force the request be HTTP/1.0 so it shouldn't)

It's hard to debug.

1 Answers1

0

Most likely apache or php problem. Once I solved it by the help of this topic: https://stackoverflow.com/questions/12456285/chrome-loads-a-text-html-file-but-shows-status-failed-and-does-not-render-on-s

Semirke
  • 314
  • 1
  • 2