I'm encountering a strange error in my web app running CakePHP 2.6:
Random static content files are taking forever to load, and when they do take forever to load, they don't work properly. These files are living where I generally assumed they were supposed to: /app/webroot/css
and app/webroot/js
.
In this screenshot, a JS file takes 10 seconds:
When the static content is JavaScript, it triggers a syntax error:
Previewing the response, we see that the HTTP header is being interpreted as part of the script. The JS engine sees the header and throws a syntax error.
This also happens randomly when it's a different HTTP code, like 304 Not Modified:
An example of the response when it doesn't take forever to load:
And an example of the header when it doesn't take forever to load:
Could there be something I've got misconfigured in my Cake app? The fact that this is happening seemingly randomly is really driving me nuts.