views:

48

answers:

1

I have jQuery UI Tabs which load their content via AJAX. About once every 15 times when the entire page is loaded (not just XHR), things fail and I don't see the proper content in the tab.

Fiddler showed me that when things fail I also see that jQuery.js and jQuery-ui.js are both sent to the browser in full (~100kB). Normally, a page load results in HTTP status code 304 for both of those files, they're not re-downloaded, and the page displays properly. When the status code is 200 and fresh copies of jQuery/UI are sent, things fail.

I notice this most often in IE8, but that's because I use it for web development. I have seen it in Firefox, but for some reason I can't reproduce it now.

Fiddler shows that the HTTP request asks for:

GET /Scripts/jquery-1.3.2.min.js?_=1255309685187 HTTP/1.1

I can't figure out what the ?_=1255309685187 is for, but I'm guessing it's a token to indicate for how long the file should be cached.

Since I can't reproduce the problem in Firefox right now, I don't know what Firebug says.

Any insight would be appreciated.

EDIT: This is with Visual Studio's development webserver.

A: 

I think you are wrong about the underscore parameter. The only way that should get there is if it is part of your script src attribute. Have you tried a javascript debugger?

recursive
No, I haven't tried debugging it. The JavaScript appears to execute just fine, but the page displays improperly. I've never had luck with Visual Studio's JavaScript debugger, and since I can't reproduce the problem in FF right now, I can't use Firebug.
Slack
Ain't it the truth: Where you have the best tools you can't get it to manifest, and where your tools look like stone axes you get all kinds of weird errors. Checkout FirebugLite at http://getfirebug.com/lite.html. It might help. Good Luck.
Peter Rowell