views:

50

answers:

1

Using an adapted version of jquery.inplace.js for some page creation and use an OBDC connection in the background php file to query for content. Everything works, BUT...

I am surprised that IE6, 7, or 8 are all pretty quick, as is chrome, but firefox seems to take quite a few seconds for exactly the same task, in this case.

This is without firebug, or lots of other add-ons enabled. I am puzzled by what to look for. It is a fairly simple return of some html content.

What would you try?

+2  A: 

A cursory look at the source in the SVN doesn't show anything which I believe firefox would have problems with.

Can you explain exactly what is "slow"? Is it the POST request? Have you tried logging the HTTP Headers sent to the server from both IE and FF?

If it's the javascript itself, try running the profiler in firebug; FF might find a specific function a little "heavy" (for instance, one of the regexes).

Also, FF3.5+ already has String.trim*() methods built-in. The code you're using overwrites those with a custom version, which will be much slower and might even be causing firefox to behave oddly. Try changing the source to the following:

if( String.prototype.trim === undefined ) {
    String.prototype.trim = function() {
        return this.replace(/^\s+/, '').replace(/\s+$/, '');
    };
}

That way the plugin will only add the trim method for older browsers.

digitala
Thank you so much. This at least gets me looking in the right area for the slow response. Profiler is showing the data() function in jquery taking 35%, trigger() 16%. Your suggestion did remove the trim contribution. Appreciate that. The difference in firefox to IE or chrome is that firefox is taking nearly 9 seconds longer.
datatoo
Come to find out, I totally neglected to ever completely turn off firebug, and it was the actual cause of the huge disparity. I feel so dumb to have missed that. Now this is fraction of a second in firefox as well.
datatoo