Basic `web.config` for IIS
User guide
- Getting Started
Concepts
Configuring webhint
Connectors
Development flow integration
Formatters
Hints
- AMP HTML validator
- Avoid CSS limits
- Avoid HTTP redirects
- aXe accessibility check
- Babel configuration hint set
- Compatibility of CSS, HTML and JavaScript features
- Correct `Content-Type` header
- Correct manifest extension
- Correct viewport
- Disallowed HTTP headers
- External links disown opener
- Has web app manifest
- Highest document mode
- HTTP cache
- Manifest has name
- Minify JavaScript
- Modern DOCTYPE
- No `P3P` headers
- No broken links
- No byte-order mark
- No protocol-relative URLs
- No small error pages
- No vulnerable libraries
- Nu HTML test
- Optimal compression
- Optimize images
- Performance budget
- Prefixed CSS first
- Specify button type
- SSL server test
- TypeScript configuration hints set
- Unneeded HTTP headers
- Use `Strict-Transport-Security` header
- Use `X-Content-Type-Options` header
- Use Apple touch icon
- Use charset `utf-8`
- Use HTTPS
- Use subresource integrity
- Valid `Set-Cookie` header
- Valid `theme-color`
- Valid manifest
- webpack configuration hints set
Parsers
Server configurations
Telemetry
Troubleshoot
- Concepts
- Configuring webhint
- Connectors
- Development flow integration
- Formatters
- Hints
- Parsers
- Server configurations
- Telemetry
- Troubleshoot
Basic web.config
for IIS
The following web.config
should be a good starting point to
pass most of webhint
's checks that require adding to or modifying
the server configuration.
There are some assumptions though:
- The site is static. If you are using node with iisnode, ASP.NET, etc. you will have to add the required configuration (but most of this configuration should still be valid).
- All the static assets are in the folder
dist/static
. - The static resources (CSS, JavaScript, images, etc.) have precompressed
gzip
andbrotli
versions. You can look into IIS.Compression if you want IIS to take care of that directly. - Any URL that ends with
/
is going to serve an static HTML page that is already in the file system. - The encoding of text based resources is
utf-8
.
Each section has a comment with a small explanation and the related hint:
<!-- |
If you want to know more, it is recommended to visit the documentation of each related hint.
<?xml version="1.0" encoding="utf-8"?> |