Skip to main content

Inline javascript

PageSpeed Optimization Filters

Benefits

Write small external JS files directly into the HTML, removing the need for another roundtrip to the server.

Configuration

Enable pagespeed EnableFilters inline_javascript
Enabled by default via RewriteLevel CoreFilters
Disable pagespeed DisableFilters inline_javascript

Risk Classification

Moderate

Example