CodingPrioritize loading sequence..?

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  steve      
35784.7 In reply to 35784.1 
I glazed over the jQuery stuff, so this might be answered, but rather than document.write a CSS definition, you can call a function to set the CSS style onLoad. Something like (but possibly different if this doesn't work):

javascript code:
function setBkgdImg()
{
document.body.style.backgroundImage = '/path/image.jpg';
}

some things never change
0/0
 Reply   Quote More 

 From:  Matt  
 To:  steve      
35784.8 In reply to 35784.1 
(I haven't tested this, but it should work I think.)

If you don't want to use Javascript at all you may also be able to use the so-called sub-domain persistent connection trick.

Basically what you need to do is create separate sub-domains for each type of content, i.e. images.domain.com for static images and dynamic.domain.com for the kaleidoscope image script and keep www.domain.com for serving up the HTML and CSS.

Doing this will trick most (if not all) browsers into loading the content in parallel instead of queuing up the requests in accordance to it's max-connections-per-domain setting that most browsers have built in. If it works it means the kaleidoscope image shouldn't block the requests to load the other images.

doohicky

0/0
 Reply   Quote More 

 From:  steve   
 To:  Matt     
35784.9 In reply to 35784.8 
Ooh, that sounds like a nice tidy way to do things. Thank you sexpot.

0/0
 Reply   Quote More 

Reply to All    
 

1–9

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats