I have a web application where a javascript object is loaded via a script tag. The js object is then referenced in another script tag that follows. There is no defer or async attribute on either script. This works without an issue until I get a 304 status on the first script.
Whenever the first script returns a status 304 the application acts as though the object created in the script doesn't exist. As if maybe the scripts are being parsed out of order? The application ends up hanging itself whenever this happens.
The application is a ASP.net MVC application being run on iis7. The web config contains static file handlers for js files.
Also the 304 status seems to be completely random. Sometimes i will get a 200 even when the file hasn't been modified then randomly it will come back as a 304.
This also happens across all browsers.
Has anyone seen this behavior or know why this would happen?