EN, Change language
Englishالعربية
BH-101

JavaScript and CSS live in external files, not large inline blocks.

The requirement

JavaScript and CSS live in external files, not large inline blocks.

Why it matters to users

Large inline blocks are downloaded again with every page the citizen opens, while an external file is cached once. They pay from their data plan for the same code over and over.

How to fix it

Move inline script and style blocks longer than a few lines into external files that load once and are cached. Then scan again.

How we measure it

Inline script and style bytes per page (over 20KB flagged, a threshold set by xfix).

Its official source

Related rules

Scripts and styles external · Bahrain BH-101 | xfix