Why this matters
string.Equals() for checking empty strings is inefficient. Use string.IsNullOrEmpty() instead for clarity and performance.
string.IsNullOrEmpty() for String Checksstring.Equals() for checking empty strings is inefficient. Use string.IsNullOrEmpty() instead for clarity and performance.
string.Equals() for checking empty strings is inefficient. Use string.IsNullOrEmpty() instead for clarity and performance.
Side-by-side examples engineers can pattern-match during review.
"".Equals(title); // Noncompliant
!title.Equals(""); // Noncompliant
title.Equals(string.Empty); // Noncomplianttitle != null && title.Length > 0 // Compliant but more error prone
!string.IsNullOrEmpty(title)
string.IsNullOrEmpty(title)From the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.