In what seems to be random occurrences, javascript files are not loading.
I believe this diagnosis is correct because a) I have code to check, b) I’ve stepped through the code, and c) I get “’myfunction’ is undefined” error when functions in those files are used.
Sometimes this doesn’t happen for an hour, sometimes it happens every time I load the page, sometimes it happens every other time I load the page. It seems like every time I identify a consistent behavior so I can repeat it and diagnose it, it changes!
Does anybody have any idea what might be causing this?
I’m using :
- IE version 7.0.5730.11 (had &
uninstalled IE8 Beta) - VS2008
Right now, it appears to only be happening to my colleague and I on our development environments.
There is one script which appears to be missing more than any other. Here’s the script tag.
<script language="javascript"
type="text/javascript"
src="js/Ajax.Utility.js?<%= ConfigurationManager.AppSettings["WebApp.JavaScript.FileVersion"].ToString() %>"></script>
Which evaluates to
<script language="javascript"
type="text/javascript"
src="js/Ajax.Utility.js?090324a"></script>
The version query string parameter doesn’t appear to have any effect either since I’ve both had and not had the problem immediately after changing it.
Just an FYI for anybody having the same problem.
This was never resolved, but I now believe it had something to do with Visual Studio Development Server, and I question if this would have happened had I been using IIS. Unfortunately, I no longer work on that project, so I cannot test it.