Which of the two HTML snippets perform better?
Including the CSS & JS in the HTML
<html> <head> <style> <?php include("someStyle.css"); ?> </style> <script> <?php include("someScript.js"); ?> </script> </head>
OR linking the CSS & JS:
<html> <head> <title>Family Tree</title> <script src="someScript.js"></script> <link href="someStyle.css" rel='stylesheet' type='text/css' /> </head>
The logic I can think of is
- The server receives fewer hits (+server)
- Parallel transfers are reduced (-browser)
- DEFLATE performance is improved, if used. (+server)
Will I notice an improvement / degradation for large server loads?