4 ms·
I want to make this Blue Oranges 35 thing real. Here's a start: Level 0 (basic): • XHR, not ajax • No anchoring namespaces (no /r/ or /b/, just have us
by seiji 16y ago
I want to make this Blue Oranges 35 thing real. Here's a start:
Level 0 (basic):
• XHR, not ajax
• No anchoring namespaces (no /r/ or /b/, just have users/spaces at the root.)
• No file extensions in URLs (no .html, .cgi, .aspx, ...)
• All production HTML/JS/CSS has newlines stripped to 32k characters per line.
• gzip for all html, js, css, json, ...
• Proper password storage
• Not exploitable by injection
• No XSS problems
• ...
Level 1 (extended):
Level 0 +
• Proper expires headers
• Proper CDN usage
• All authenticated transactions over https
• All JS/CSS minified but with full versions readily accessible.
• ...
Level 2 (optimal):
Level 1 +
• All pages generate in under 300ms
• All images properly sized/crushed
• ...
- gojomo 16y agoWhy are 64K-long lines considered a good thing? And, when the site has minified the JS/CSS, how would full versions be readily accessible? A site that is happy with others learning from their own good practices won't want to do things that have the effect of obfuscating their resources, if the savings are very small. So other than the 'levels', you might want to split your benchmarks on whether collateral obfuscation is considered positive/neutral or negative.
- seiji 16y agoOh, I misremembered the line length. It's 32k from max-line-len option at https://github.com/mishoo/UglifyJS https://github.com/mishoo/UglifyJS As for having min and non-min, I like to have "file.compressed.js" and "file.js" available. We shouldn't shut off all avenues of learning for the sake of expediency.