its expected to get a 304 response with a HTTP request header containing If-None-Match or a If-Modified-Since header, And the reason it happens for java script files is because static content will be cached.
I see. As Nesh mentioned below 304 is not error message. It just means that java script was cached on the client side and it was not updated on the server side since last download, thus it was not provided by the server side. This is as per HTTP rules and nothing wrong with it until it breaks service on you side.