Performance: Public and assets folders
MEDIUM IMPACT
This concept affects page load speed by controlling how static files like images, stylesheets, and scripts are served to the browser.
Use the assets folder with the Rails asset pipeline to fingerprint, compress, and cache static files before deployment.
Place all images and CSS files directly in the public folder without fingerprinting or compression.
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Unoptimized public folder files | 0 (static files) | 0 | High due to large file size | [X] Bad |
| Optimized assets folder with fingerprinting | 0 (static files) | 0 | Low due to compression and caching | [OK] Good |