We Read the Content-Type Header on 570 .ae Homepages: 53.5% Serve JavaScript With No nosniff
We checked Content-Type, charset and one asset of each kind on 787 UAE .ae domains on 26 November 2026. Encoding is fixed: 96.8% declare it right. Enforcement is not: 53.5% of JavaScript ships with no nosniff.
- PUBLISHED
- 26 NOV 2026
- READ TIME
- 13 MIN
- AUTHOR
- AQUARIUS · DUBAI
- UNIT
- REV 2026.09
Short answer: we read the Content-Type header, the HTML <meta charset> and one asset of every kind on 787 UAE .ae domains on 26 November 2026. Of the 570 live homepages, 96.8% declare their character encoding correctly — the old Arabic-mojibake problem is effectively solved. But across 1,693 asset responses, 53.5% of JavaScript files ship with no X-Content-Type-Options: nosniff, 33.9% of homepages send none at all, and 18 sites serve assets under a type that is flatly wrong.
So the labels are right and the enforcement is missing. UAE sites learned to say UTF-8; they never learned to make the browser hold them to what they said.
Why one header decides whether your scripts run at all
The UAE is now effectively fully online: 11.5 million internet users and 24.9 million mobile connections as of October 2026, per DataReportal's Digital 2027 report, which caps its adoption rate at 99%. That audience is transacting too — EZDubai and Euromonitor International put UAE e‑commerce at AED 42.2 billion in 2025, heading to AED 67.2 billion by 2030 at a 9.9% CAGR, taking online from 15.7% of all UAE retail sales past 20%.
And it is under constant probing. On 18 February 2026 the UAE Cyber Security Council reported 128 confirmed cyber-threat incidents against UAE entities that year, and the single largest category was not ransomware — it was defacement, at 38.3% of all incidents, ahead of data leaks (25.8%) and data breaches (13.3%). The same briefing put daily breach attempts at 90,000–200,000; by May the Council was citing more than 800,000 a day. IBM's Cost of a Data Breach 2026 puts the Middle East average breach cost at USD 8 million.
Defacement means hostile content being rendered or executed where it should not be. That is exactly the attack class nosniff exists to close. Per MDN, the directive “blocks a request if the request destination is of type style and the MIME type is not text/css, or of type script and the MIME type is not a JavaScript MIME type.” Without it, a browser is free to look at the bytes of an uploaded .txt or a user avatar, decide it looks like JavaScript, and run it.
How we measured it
Two passes, both first-hand, no third-party data:
- Pass 1 — the document. 787
.aehosts from the Tranco top list, HTTPS with HTTP fallback, redirects followed. For each we recorded the responseContent-Type, any charset parameter, any byte-order mark, the<meta charset>and its byte offset,lang/dir, and whether the body was valid UTF-8. 688 hosts answered; 570 returned a 2xxtext/htmldocument. The rest were connect timeouts (48), connection errors (38) or bot walls (102 x 403). - Pass 2 — the assets. On every live homepage we parsed out the first same-origin JS, CSS, SVG, WOFF2, JSON and image reference, fetched the first 4 KB of each, and compared the declared type against the actual magic bytes. 1,693 asset responses across 505 hosts.
Finding 1: the Arabic mojibake panic is over
This is the myth-bust. Every Dubai web checklist still warns about garbled Arabic from a missing charset. We went looking for it and found zero: not one of the 570 homepages returned invalid UTF-8 bytes, not one U+FFFD replacement character appeared in rendered copy, and not one host showed the classic Arabic double-encoding signature. Of 185 hosts (32.5%) carrying substantial Arabic text, 179 send a charset in the header.
Only two sites in the whole sample resolve to a non-UTF-8 encoding at all: ccavenue.ae (ISO-8859-1 header plus a windows-1252 meta tag) and the shjpolice.gov.ae apex, which declares iso-8859-1 in markup with no header charset — while its own www host serves clean UTF-8. Encoding is not your problem any more. Which is precisely why nobody is looking at the rest of the header.
Finding 2: nosniff is missing exactly where it matters most
66.1% of homepages (377 of 570) send X-Content-Type-Options: nosniff on the HTML document. That is genuinely good — the Web Almanac's 2025 security chapter measured the same header at 48.96% of mobile site requests globally (51.39% desktop), so the UAE's top .ae sites are roughly 17 points ahead of the world on the document. The assets are a different story — and assets are what actually execute.
| Asset type | 2xx responses | With nosniff | Shipping unprotected |
|---|---|---|---|
| JavaScript | 458 | 46.5% | 53.5% |
| CSS | 452 | 46.7% | 53.3% |
| Images | 400 | 53.0% | 47.0% |
| SVG | 233 | 55.8% | 44.2% |
| WOFF2 fonts | 98 | 61.2% | 38.8% |
| JSON | 52 | 57.7% | 42.3% |
| HTML document | 570 | 66.1% | 33.9% |
The pattern is unmistakable: the header is bolted onto the page by a security scan and never reaches the asset path. Cross-referencing per host, 103 sites protect their homepage but not their own JavaScript, 142 protect neither, and only 210 protect both. Three sites manage the reverse.
The reason is almost always where the header is set. By stack:
| Server / edge | Homepages | nosniff on HTML | nosniff on JS |
|---|---|---|---|
| Cloudflare | 253 | 71.9% | 43.6% |
No Server header | 131 | 69.5% | 64.6% |
| Microsoft-IIS | 19 | 57.9% | 42.9% |
| nginx | 56 | 44.6% | 38.8% |
| Apache | 35 | 42.9% | 36.0% |
| LiteSpeed | 17 | 29.4% | 23.1% |
Cloudflare sites lead on the document and then drop 28 points on their scripts, because a transform rule scoped to HTML does not touch /assets/*. Government sites do better than the field — of 55 live .gov.ae homepages, 41 (74.5%) send nosniff, and 76.8% of their asset responses carry it.
Finding 3: 18 sites are serving assets under the wrong type right now
Mislabelling is rare but brutal when it happens, because nosniff turns a cosmetic error into a hard block. Only 18 hosts (3.6%) get a type wrong, concentrated in the formats nobody tests: 9.6% of JSON responses and 7.1% of WOFF2 responses are mislabelled, versus 0.4% of JavaScript. Verified live examples, re-checked on both apex and www:
- digitaldubai.ae returns
200 OKwithContent-Type: text/html; charset=utf-8for/ResourcePackages/Theme/assets/dist/js/jquery.min.js— the body is an HTML document. It also sendsnosniff. Chrome therefore refuses to execute it: jQuery silently never loads on that path. - awqaf.gov.ae serves
/src/assets/fonts/stylesheet.cssastext/htmlcontaining an HTML page — a stylesheet a browser will not apply. - dct.gov.ae returns its
/manifest.jsonastext/htmlwith an XHTML page in the body, which breaks PWA install metadata. - added.gov.ae answers a request for
safari-pinned-tab.svgwith atext/html“Request Rejected” WAF page at200 OK— a blocked request dressed up as a success. - astratech.ae sends its Poppins WOFF2 as
application/octet-stream; the magic bytes are a validwOF2, so it works, but it defeats caching and type checks.
Separately, 32 responses declared image/x-icon or image/vnd.microsoft.icon while actually shipping PNG bytes — harmless today, and a good indicator that nobody has ever inspected these responses. Five hosts also attach a pointless charset= to binary SVG and image responses.
Finding 4: 13.2% declare their charset too late to count
Here is the subtle one. The HTML Standard requires that “the element containing the character encoding declaration must be serialized completely within the first 1024 bytes of the document,” and browsers are explicitly told not to prescan past that point. Lighthouse even has a dedicated failure for it: “Charset declaration is missing or occurs too late in the HTML.” 534 homepages carry a meta charset, but only 459 put it inside that window. 75 sites (13.2%) declare their encoding too late to be authoritative — median offset 21,705 bytes, worst case 230,278 bytes, buried behind inline scripts and preload tags.
Most get rescued by a header charset. Seven do not: dubaipolice.gov.ae, hostinger.ae, hatstore.ae, starcinemas.ae, myprotein.ae, uniformfactory.ae and nagitabet.ae all rely on a declaration the parser is entitled to ignore. In total 18 homepages (3.2%) have no effective encoding declaration anywhere — among them rta.ae, khda.gov.ae and tahseel.gov.ae, verified on both apex and www.
One site disagrees with itself: federalerp.gov.ae sends a UTF-8 header and an ISO-8859-1 meta tag. The header wins, so nothing visibly breaks — it simply means nobody owns the answer.
Fix it this week: the three-line version
1. Set nosniff globally, not on HTML
The failure mode in our data is scoping. On nginx, put it in the server block so it inherits into every location, including static assets:
add_header X-Content-Type-Options "nosniff" always;
On Apache, use Header always set X-Content-Type-Options "nosniff" at virtual-host level. On Cloudflare, add it as a response-header transform rule with the filter set to all requests, not text/html. Then test an actual .js URL, not the homepage — that is where 103 sites in this sample stop.
2. Audit the types you never look at
Request your own manifest.json, your webfonts and one SVG with curl -I. JSON and WOFF2 are the two worst-performing categories in our scan for a reason: they are served by the same rules nobody revisits after launch. If a WAF or SPA rewrite is returning an HTML page at 200 OK for a missing asset, you have the same root cause as the soft-404 problem we measured across 787 .ae domains.
3. Move the meta charset to the first line of head
Before any <title>, before any preload, before any inline tag manager. It costs nothing and removes a class of bug that only shows up for the one visitor on a slow connection whose first chunk arrives alone. While you are in there, check lang and dir: 55 of these homepages have no lang attribute at all, and only 56 set dir="rtl" — see our Arabic RTL readiness scan for what that costs in Arabic search.
What this is worth in AED
There is a compliance edge too. The UAE's PDPL — Federal Decree-Law No. 45 of 2021 — still has no executive regulations issued as of today, so Article 20 is the operative obligation: controllers must take “appropriate technical and regulatory measures to ensure the highest standard of information security.” Nobody will fine you for a missing header. But a defacement that reached your users through a sniffed asset is exactly the kind of incident that makes Article 20 a question rather than a formality.
Nothing on this page is a redesign. It is configuration — and configuration is the cheapest ROI available on a UAE website, because the alternative is paying for traffic that lands on a page whose JavaScript did not execute. With UAE online retail at AED 42.2 billion and growing near 10% a year, a checkout script that Chrome refuses to run is not a security finding, it is lost revenue measured per hour.
How Aquarius handles it: every site we build ships nosniff at the server block (not the page), a first-line <meta charset>, correct per-type MIME mapping including WOFF2 and JSON, and a deploy-time check that fetches one asset of each kind and fails the build on a mismatch. Same discipline we apply to subresource integrity and CSP.
Our published pricing starts at AED 500 for a 1–3 page Starter Site live in 3–5 days, AED 2,500 for an 8-page bilingual Business Site with SEO and AEO built in, and AED 10,000 for custom web or mobile apps with auth, payments and dashboards. Header hardening is included, not an upsell. If you already have a site, send us the URL and we will run the same 12 checks from this scan against it and tell you plainly whether anything is broken — no obligation, no audit fee.
FAQ
Does adding nosniff risk breaking my site?
It can — and that is the point. If a script or stylesheet is currently being served under the wrong MIME type, the browser is sniffing its way to success today and nosniff will stop it. That is why you deploy it with a pass over your own assets first: fix the type, then enforce it. In our sample only 0.4% of JavaScript responses were mislabelled, so for most Dubai sites the change is invisible. One reassurance: the check tests the MIME essence only, so text/javascript; charset=utf-8 passes fine. A wrong charset never blocks a script — only a wrong type does.
Is a charset in the HTTP header enough, or do I need the meta tag?
The header wins when both are present, so technically the header is enough. Ship both anyway: 50 of the hosts we measured have a meta tag and no header, 25 have a header and no meta, and the file saved to disk or opened from cache has only the meta tag to go on.
Do Arabic sites need windows-1256 or any special encoding?
No. Use UTF-8 for everything — the HTML Standard is not soft about it: “regardless of whether a character encoding declaration is present or not, the actual character encoding used to encode the document must be UTF-8.” 179 of the 185 Arabic-content hosts we scanned send a UTF-8 charset, and we found zero encoding damage across the entire sample. The legacy Arabic codepages are a 2010 problem.
Does any of this affect SEO rankings directly?
Not as a ranking factor, but it affects what Googlebot can build. A stylesheet or script blocked by a MIME mismatch changes how the page renders during indexing, and a WAF page returned at 200 OK for a missing asset feeds the crawler noise. Fixing it protects crawl budget and rendering fidelity, which is where the traffic actually comes from.
How do I check my own site in two minutes?
Run curl -I https://yoursite.ae/ and then the same against one .js, one .css, your manifest.json and one webfont. Look for X-Content-Type-Options: nosniff on every line and a sane Content-Type on each. If the header appears only on the first command, you are one of the 103.
Method note: single-request-per-host measurement taken 26 November 2026 from outside the UAE, 787 Tranco-ranked .ae hosts, 10-second timeout, redirects followed. Bot-walled and timed-out hosts are excluded from percentages rather than counted as failures. Named hosts were re-verified on both apex and www before publication. Tell us your domain and we will add it to the next pass.
