Performance: Resource naming conventions
Resource naming conventions affect caching efficiency and network request deduplication, impacting page load speed and responsiveness.
app.use('/assets', express.static('public/assets')); // Files named with content hashes like style.abc123.css and script.def456.js
app.use('/assets', express.static('public/assets')); // Files named inconsistently like style.css?v=123 or script_final.js
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Inconsistent resource names causing cache misses | N/A | N/A | Blocks rendering until resource loads | [X] Bad |
| Consistent content-hashed resource names | N/A | N/A | Non-blocking after first load due to caching | [OK] Good |
const resources = ['product-list', 'products', 'ProductList', 'productList'];
console.log(resources.includes('products'));userProfile. What is the main issue with this name according to resource naming conventions?/orders for all orders and /orders-items for items
B) /order for all orders and /order-items for items
C) /orders for all orders and /order-items for items
D) /orders for all orders and /orders-items for itemsPass the test and this pattern moves unknown