3 ms·
Practically speaking these optimizations won't make much of a difference, but I still find them interesting. I have been keeping a list of similar optimizations
by btrettel 6y ago
Practically speaking these optimizations won't make much of a difference, but I still find them interesting. I have been keeping a list of similar optimizations. Here are some not in the linked article:
- Use relative URLs when possible, i.e., /page.html, no need to specify the protocol.
- Use shorthand CSS properties like font, background, margin, border, padding, and list.
- Use lowercase tags as they compress better. See: https://encode.su/threads/1889-gzthermal-pseudo-thermal-view-of-Gzip-Deflate-compression-efficiency https://encode.su/threads/1889-gzthermal-pseudo-thermal-view...
- Use shorthand hex colors.
These optimizations are harmless compared against some of the ones recommended in the linked article...
- cdubzzz 6y agoWeird. I have always incorrectly referred to URLs beginning with a “/“ as absolute. Oops.
- johncmouser 6y agoI thought that "/" was absolute and "../../something/else" was relative.
- btrettel 6y agoIn my notes I had this called "site relative" following this Stack Exchange post: https://webmasters.stackexchange.com/a/71376/12374 https://webmasters.stackexchange.com/a/71376/12374 But you're right; relative by itself would refer to relative to the current location. Error on my part in not being specific enough. In retrospect "site relative" is not good terminology.
- deaddodo 6y agoIt's URL relative. Example, for "http://mysite.com/dir/page1.html" http://mysite.com/dir/page1.html": * Relative: "../other_dir/page2.html" * URL relative: "/other_dir/page2.html" * Absolute: "http://mysite.com/other_dir/page2.html"
- divbzero 6y ago> Use relative URLs when possible Protocol relative URLs can also be used for different domains as long as protocol remains the same, which is often the case with https: so widespread, e.g.: <script src=//code.jquery.com/jquery-3.5.1.slim.min.js integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin=anonymous> </script>