Hi.

I can't give much super targeted help with the info you provide.  I have a 
couple thoughts that may or may not be helpful.

Although there are exceptions, usually javascript that fails because the page 
is not loaded will still fail even if your network connection is very fast (in 
other words network speed is unlikely to outrun client side javascript 
execution speed under most circumstances).

> Basically he shows that you can apply certain scripts much faster by 
> simply putting the necessary code after the elements the scripts work 
> with.

I've used this trick and it should work fine, provided the inline JS code 
really really does come after (in the DOM) everything it is trying to touch.

> Well, it works in FF without any problems, but IE completely
> refuses to load the page at all

This is very common when you refer to a DOM element that doesn't exist yet.  FF 
will recover as gracefully as it can (although if you have firebug or error 
reporting turned on you may get a report) and IE will just stop trying to run 
inline JS for the rest of the page.

> My attempts to delay rendering of parts of a page using PHP's 
> sleep() or usleep() functions doesn't help at all, I simply don't
> get any output at all until all calls to sleep finish

Try this for more control over php output buffer:

http://us3.php.net/outcontrol

Sometimes an ISP will wrap php so that it doesn't all work the way php thinks 
it's going to but if you have control over your server environment you should 
be to simulate delayed delivery of page components.

-------->Nathan


.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:.

Nathan Young
Cisco.com->Interface Development
A: ncy1717
E: [EMAIL PROTECTED]  

> -----Original Message-----
> From: jquery-en@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jörn Zaefferer
> Sent: Monday, April 02, 2007 2:44 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Dealing with incremental page rendering and 
> ready events
> 
> 
> Hi folks,
> 
> I'm trying to solve a severe performance issue I'm experiencing in an 
> enviroment that heavily uses incremental page rendering. I 
> have several 
> parts on one page that are basically independent, but to apply any 
> JavaScript to one of those parts (actually jsr168 portlets on a 
> websphere portal) I currently rely on jQuery's DOM ready 
> event, which is 
> simply too late, causing ugly rendering issues.
> 
> Now I stumbled about this blog entry by Ben Nadel: 
> http://www.bennadel.com/index.cfm?dax=blog:583.view
> Basically he shows that you can apply certain scripts much faster by 
> simply putting the necessary code after the elements the scripts work 
> with. That is a viable solution that could be quite helpful for my 
> issue, but unfortuantely I can't get it to work: Well, it works in FF 
> without any problems, but IE completely refuses to load the 
> page at all, 
> instead alerting me about something like "can't display this 
> page", so 
> quite impossible to debug.
> 
> Now I tried to seperate testing of the workaround from the actual 
> enviroment and failed to properly simulate incremental page 
> rendering. 
> My attempts to delay rendering of parts of a page using PHP's 
> sleep() or 
> usleep() functions doesn't help at all, I simply don't get 
> any output at 
> all until all calls to sleep finish. And under that circumstance the 
> put-script-behind-element works perfectly.
> 
> So, any hint on how to get one of those issues solved is 
> highly welcome, 
> be it executing scripts before DOM ready in IE or simulating 
> incremental 
> page rendering.
> 
> -- 
> Jörn Zaefferer
> 
> http://bassistance.de
> 

Reply via email to