Re: [jQuery] IE6 performance tweak

2006-10-09 Thread Webunity | Gilles van den Hoven
Klaus Hartl wrote:
 The by far safest thing to use is Conditional Compilation. And that way 
 other browsers only get JavaScript comments...:
   
Yeah i saw that on your blog. But doesn't this affect all versions of 
msie, even 6+ ?

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-09 Thread Klaus Hartl


Webunity | Gilles van den Hoven schrieb:
 Klaus Hartl wrote:
 The by far safest thing to use is Conditional Compilation. And that way 
 other browsers only get JavaScript comments...:
   
 Yeah i saw that on your blog. But doesn't this affect all versions of 
 msie, even 6+ ?


Yes, but that does jQuery.browser.msie as well. If I want to exclude IE7 
  I perform the following check:

/[EMAIL PROTECTED]
if (typeof XmlHttpRequest == 'function')
 document.execCommand(BackgroundImageCache, false, true);
@*/

That assumes jQuery's Ajax module. Maybe you could use the variable 
@_jscript_version to make the distinction (it's 5.6 in IE6 and 5.7 in 
IE7), but I'm not sure if that ever changes with a possible update for IE6:

/[EMAIL PROTECTED]
if (parseFloat(@_jscript_version)  5.7)
 document.execCommand(BackgroundImageCache, false, true);
@*/


-- Klaus



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-09 Thread Sam Collett
On 09/10/06, Klaus Hartl [EMAIL PROTECTED] wrote:


 Webunity | Gilles van den Hoven schrieb:
  Klaus Hartl wrote:
  The by far safest thing to use is Conditional Compilation. And that way
  other browsers only get JavaScript comments...:
 
  Yeah i saw that on your blog. But doesn't this affect all versions of
  msie, even 6+ ?


 Yes, but that does jQuery.browser.msie as well. If I want to exclude IE7
   I perform the following check:

 /[EMAIL PROTECTED]
 if (typeof XmlHttpRequest == 'function')
  document.execCommand(BackgroundImageCache, false, true);
 @*/

 That assumes jQuery's Ajax module. Maybe you could use the variable
 @_jscript_version to make the distinction (it's 5.6 in IE6 and 5.7 in
 IE7), but I'm not sure if that ever changes with a possible update for IE6:

 /[EMAIL PROTECTED]
 if (parseFloat(@_jscript_version)  5.7)
  document.execCommand(BackgroundImageCache, false, true);
 @*/


 -- Klaus


I think, if possible, the browser detection should check browsers
through something other than the user agent.

// Figure out what browser is being used
jQuery.browser = {
safari: /webkit/.test(b),
opera: !!window.opera,
msie: /[EMAIL PROTECTED]
/[EMAIL PROTECTED] (@_jscript)
true
@else @*/
false
/[EMAIL PROTECTED] @*/
mozilla: !!window.Components
};

This assumes no one creates an object called 'opera' or 'Comnponents'
on the window object. I'm not sure what is unique in Safari as I can't
find any pages on Apple detailing the DOM in Safari.

Not friendly with Dean Edwards' packer tool though, which won't be
able to compress any code that uses conditional comments without
breaking it.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] IE6 performance tweak

2006-10-08 Thread Joe
This somehow improves the performance of IE6. Interesting object detection as well. Opinions on this method?http://www.hedgerwow.com/360/bugs/dom-fix-ie6-background-image-flicker.html 
		 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-08 Thread Brandon Aaron
If you are changing background images/colors a lot then this,
according to the MSDN article, will stop a memory leak associated with
that in IE6 and would result in better performance over a long period
of time. I would assume that Dean's server side solution would fix
this as well.

BTW ... that site was just chewing up my CPU in Safari due to the
constant moving background.

--
Brandon Aaron

On 10/8/06, Joe [EMAIL PROTECTED] wrote:
 This somehow improves the performance of IE6. Interesting object detection
 as well. Opinions on this method?

 http://www.hedgerwow.com/360/bugs/dom-fix-ie6-background-image-flicker.html



  
  All-new Yahoo! Mail - Fire up a more powerful email and get things done
 faster.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-08 Thread Webunity | Gilles van den Hoven
This somehow improves the performance of IE6. Interesting object detection
 as well. Opinions on this method?
 
Hi,

This hack was allready posted to this list by me, and someone told us 
you could use jQuery's method of detecting MSIE before applying the hack,

Something like this, in my base.js file.
// Object initializatie
$(document).ready(function() {
// Fix background image caching problem
if (jQuery.browser.msie) {
try { document.execCommand(BackgroundImageCache, false, true); 
} catch(err) {}
}
});

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-08 Thread Klaus Hartl


Webunity | Gilles van den Hoven schrieb:
 This somehow improves the performance of IE6. Interesting object detection
 as well. Opinions on this method?
 
 Hi,
 
 This hack was allready posted to this list by me, and someone told us 
 you could use jQuery's method of detecting MSIE before applying the hack,
 
 Something like this, in my base.js file.
 // Object initializatie
 $(document).ready(function() {
 // Fix background image caching problem
 if (jQuery.browser.msie) {
 try { document.execCommand(BackgroundImageCache, false, true); 
 } catch(err) {}
 }
 });
 
 -- Gilles

The by far safest thing to use is Conditional Compilation. And that way 
other browsers only get JavaScript comments...:

/[EMAIL PROTECTED]
document.execCommand(BackgroundImageCache, false, true);
@*/


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/