Skip to content

Update README with a Table of Contents#14

Merged
nucliweb merged 1 commit into
nucliweb:mainfrom
radum:patch-1
Mar 22, 2023
Merged

Update README with a Table of Contents#14
nucliweb merged 1 commit into
nucliweb:mainfrom
radum:patch-1

Conversation

@radum

@radum radum commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

As this list grows adding a ToC helps lots. Also this can be automatically updated from your editor of choice.

As this list grows adding a ToC helps lots. Also this can be automatically updated from your editor of choice.
@nucliweb nucliweb merged commit a876d8d into nucliweb:main Mar 22, 2023
nucliweb added a commit that referenced this pull request Feb 12, 2026
Validate-Preload-Async-Defer-Scripts:
- Add missing fetchpriority="low" to <link rel=preload> tag in Solution 1
  This was a correctness bug - preload without fetchpriority="low" still
  escalates network priority even if script tag has fetchpriority="low"

Prefetch-Resource-Validation (comprehensive improvements):

Performance optimizations:
- Pre-normalize all URLs once into a Map (eliminates O(N×M) URL parsing)
- Use pre-built URL map for all matching operations
- Remove redundant URL parsing in nested loops
- Performance improvement: ~6000 URL objects → ~200 for typical cases

New validations:
- Detect invalid 'as' attribute values (typos like as="scriptt")
- Detect duplicate prefetch hints (same URL prefetched multiple times)
- Warn about large scripts (>1MB threshold, was missing)
- Validate 'as' attribute against list of valid values

Improved logic:
- Better cache detection: distinguish "cached" vs "unknown (CORS)"
  Handles case where CORS blocks timing info (both sizes === 0)
- Fixed inappropriateTypes to check scripts and provide detailed reasons
- Optimized isCurrentPageResource check to use pre-built map
- Added seenUrls Set to track duplicates

Code quality:
- Added validAsValues Set with all valid 'as' attribute values
- Added THRESHOLDS.largeScriptSize (1MB) for script-specific checks
- Better error messages with specific size/reason for inappropriateness
- Comments explaining CORS edge cases and validation logic

Documentation updates:
- Added "Invalid as", "Duplicate prefetch" to issue categories table
- Updated "Inappropriate type" description to mention scripts
- Cache status can now show "unknown (CORS)" in output

Addresses issues from comprehensive code review:
- URL matching performance (#8, #9 from analysis)
- Invalid 'as' validation (#7)
- Duplicate detection (#14)
- Large script detection (#4)
- Cache detection for CORS (#3)
- Current page detection optimization (#6)
nucliweb added a commit that referenced this pull request Feb 25, 2026
Update README with a Table of Contents
nucliweb added a commit that referenced this pull request Feb 25, 2026
Validate-Preload-Async-Defer-Scripts:
- Add missing fetchpriority="low" to <link rel=preload> tag in Solution 1
  This was a correctness bug - preload without fetchpriority="low" still
  escalates network priority even if script tag has fetchpriority="low"

Prefetch-Resource-Validation (comprehensive improvements):

Performance optimizations:
- Pre-normalize all URLs once into a Map (eliminates O(N×M) URL parsing)
- Use pre-built URL map for all matching operations
- Remove redundant URL parsing in nested loops
- Performance improvement: ~6000 URL objects → ~200 for typical cases

New validations:
- Detect invalid 'as' attribute values (typos like as="scriptt")
- Detect duplicate prefetch hints (same URL prefetched multiple times)
- Warn about large scripts (>1MB threshold, was missing)
- Validate 'as' attribute against list of valid values

Improved logic:
- Better cache detection: distinguish "cached" vs "unknown (CORS)"
  Handles case where CORS blocks timing info (both sizes === 0)
- Fixed inappropriateTypes to check scripts and provide detailed reasons
- Optimized isCurrentPageResource check to use pre-built map
- Added seenUrls Set to track duplicates

Code quality:
- Added validAsValues Set with all valid 'as' attribute values
- Added THRESHOLDS.largeScriptSize (1MB) for script-specific checks
- Better error messages with specific size/reason for inappropriateness
- Comments explaining CORS edge cases and validation logic

Documentation updates:
- Added "Invalid as", "Duplicate prefetch" to issue categories table
- Updated "Inappropriate type" description to mention scripts
- Cache status can now show "unknown (CORS)" in output

Addresses issues from comprehensive code review:
- URL matching performance (#8, #9 from analysis)
- Invalid 'as' validation (#7)
- Duplicate detection (#14)
- Large script detection (#4)
- Cache detection for CORS (#3)
- Current page detection optimization (#6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants