Best way to load files delayed / after the page loaded completely

Hey guys!

What I want to do, is: preload some css and js Files, which might be used on user interactions, to speed things up a bit. Perfect would be, if the page at first loads completely and afterwards (during the user starts using the site) load the other files to the client.

Thanks in advance,

Mayjestic

bump

You can use jQuery to do that conditionally




$("<link/>", {

   rel: "stylesheet",

   type: "text/css",

   href: "style.css"

}).appendTo("head");



Also:


.load for loading html from the server

.getScript for loading js 

Or just move links to js to the end of your pages.