11-13-2011, 02:32 PM
I was wondering;
what loads the fastest?
When you put the css-code in the html-file
or when you make an additional css-file?
Greetings and thank you for your time.
11-13-2011, 08:05 PM
the rules says to put ref to js file into head section. Often it shows that it is better to put it at the end of HTML.
For firefox get yourself httpfox addon, and you will see what is downloaded when.
11-13-2011, 11:41 PM
Technically when you put CSS inline, as there is no need for an additional HTTP request for the same amount of content.
However, if you put the CSS in an external file, it is cached, meaning it doesn't need to be downloaded again. This results in lots of bandwidth and time savings in the long run.
In reality, the difference is negligible, so save yourself the bytes and put it in an external file.
11-13-2011, 11:46 PM
That's not really a valid question. Load times for either one will depend more on how well they are written and what they are doing.