Hi guys

I have lots of external resources on my site i.e styles(css),scripts(javascript) and images.How can i ensure that they are downloaded fast when the page is requested for immediate usage on page provided there's a normal internet connection.The external styles i have are downloading too slow and the javascript doesn't work or only works partially at best.

Is there a way of preloading images to be used on image links swaps.

Can the download of external resources be done behind the scenes(asynchronously) when the page is loaded even before they are used.

Any help or tips greatly appreciated.

Hey,
Is your javascript trying to run before the js file has downloaded? You can compress your js and css files by removing all spaces and line feeds. This doesn't really save too much space if you are also downloading images of course.
If you need the page to load fully before calling scripts you can place the script that calls the function at the bottom of the page so it loads last and is called last (the js file will still be in the header of course).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.