Hi, i have an issue with my website. The browser is downloading some photos before the other which is making the website look like its broken at the first glance. I heard before that is a way to make sequence for downloading HTML components, but i didn't get to see it. Can anyone help me with this. And thanks.
Unfortunately i cant give a live url but the problem is that i have some pictures used for links and other things, while there is other pictures that is not important to show on in the beginning of loading the web page. Also in some pages pictures are loaded before the css and js files which makes the whole page look broken (all pictures divs and others are aligned to left). What i want is to force the browser for example to load the css and js files first then the pictures in the header then other pictures. Isn't there an attribute to give for html components to give them priority in being downloaded or something like that. And thanks in advance
lookup lazy loading with javascript. The page loads from top to bottom in order. I believe items should load in parallel (except for js. Not 100% sure though) When you say pictures in the header, are you referring to <head> or your header section on your page? Another option is to host your js via a CDN. You might also check the size of your images. Use Firebug and check your page load times to see what is loading when and how long its taking.
When i said header i meant the header section not the <head> And I know that that the page is loaded from top to bottom, but is there a way to override this sequence. I mean i might need to load some pictures that are below others - in page writing order - and sometimes the page is loaded with the text, list, img tags (without loading the image, but it shows the default image in the browser showing that it is not loaded yet) and other components before loading the css file. isn't there a way to make some pictures load first, and neglecting the page writing order??
I'm not sure if you can load specific items on a page in the order you want. Maybe someone else can chime in?