I like YSlow. And try using common sense by following these rules. But for fun, I'm trying to get my ASP.NET MVC site to score 100. And I'm almost there (currently at 99, even flipped my site to another server and changed something like: config to simulate a CDN).
And after testing, I found out that in order to get the perfect score according to rule 8 (Where I get one point, subtracted for 2 built-in scripts), you must violate HTML5 syntax rules (according to the w3c validator ). I think this also applies to HTML4 syntax rules.
For example, in the absence of residues (violates HTML5 syntax rules):
<script type="text/javascript" src="/ui/scripts/lib/core.js" />
And for valid HTML5, but with conclusions on the YSlow scale:
<script type="text/javascript" src="/ui/scripts/lib/core.js"></script>
My hypothesis is that in a sense this is true, since the web browser scans any script in the second example, and not in the first (since the second is an open and closed tag).
Does anyone know about this? Can a single socre become a perfect 100 and still have valid HTML5?
source share