What this page is doing (at a glance)
- App & env:
apptype:"edgeChromium",pagetype:"ntp",env:"prod", bundle alias staging, build20250815.350. - Config anchors (all from
<head>):data-client-settings→ big JSON blob (locale, geo, services endpoints, bundles, featureFlags).data-info="f:..."→ flight/experiment IDs (all thoseprg-*,1s-*,ads-*, etc.).data-canvas-info→ subset relevant to the canvas layer.
- Security/runtime: strict Trusted Types (custom policies), nonce’d scripts, SW + web worker (
_webWorkerBundle), SSR entry:/bundles/v1/edgeChromium/staging/SSR-service-entry...js - Fallbacks & resilience: dual asset domains (
assets.msn.com→ fallbackassets2.msn.com), visibility/timeouts → auto swap to local NTP or cached bundles. - Telemetry: OneCollector beacons with rich error contexts; many codes (e.g., 20203 JS exception, 22330x TT violations).
- Audience/auth: cookies
aace,ace,AL_STATE, etc. determine audienceMode (adult/kids), and whether to fetch app-anon tokens.
Quick inspectors (paste in DevTools Console)
These are read-only helpers that respect TT/CSP because you’re running them manually.
// 1) Client settings snapshot
(() => {
const raw = document.head.dataset.clientSettings;
const cs = JSON.parse(raw);
console.table([
{k:'apptype',v:cs.apptype},
{k:'pagetype',v:cs.pagetype},
{k:'env',v:cs?.pcsInfo?.env},
{k:'buildVersion',v:cs?.bundleInfo?.v},
{k:'alias',v:cs?.bundleInfo?.alias},
{k:'locale',v:`${cs.locale?.language}-${cs.locale?.market}`},
{k:'geo',v:`${cs.geo_country} @ ${cs.geo_lat},${cs.geo_long}`},
]);
console.log('servicesEndpoints', cs.servicesEndpoints);
console.log('featureFlags', cs.featureFlags);
return cs;
})();
// 2) All flights/experiments (from data-info)
(() => {
const info = (document.head.getAttribute('data-info')||'').toLowerCase();
const flights = (info.match(/f:\s*([^;]+)/i)?.[1]||'')
.split(',').map(s=>s.trim()).filter(Boolean).sort();
console.log('Flights (%d):', flights.length);
console.log(flights);
// convenient buckets
const by = p => flights.filter(f=>f.startsWith(p));
console.log({prg: by('prg-'), oneShot: by('1s-'), ads: by('ads-'), btie: by('btie-')});
})();
// 3) Runtime ropes: SSR, worker, TT policy presence
(() => {
const ssr = document.querySelector('#ssr')?.dataset?.ssrEntry || 'none';
const ww = window._webWorkerBundle || 'none';
const tt = !!(window.trustedTypes && window.trustedTypes.createPolicy);
console.table([
{k:'SSR entry', v:ssr},
{k:'Web worker bundle', v:ww},
{k:'Trusted Types available', v:tt},
{k:'NONCE_ID', v:window.NONCE_ID || 'n/a'}
]);
})();
// 4) “Is this page in a blank/failed state?” (their own heuristic)
(() => {
const hasHdr = !!document.querySelector('body > fluent-design-system-provider > edge-chromium-page')
?.shadowRoot?.getElementById('headerGrid');
const hasRubyHdr = !!document.querySelector('body > fluent-design-system-provider > ruby-page')
?.shadowRoot?.querySelector('.header-section');
console.log('Header present:', hasHdr || hasRubyHdr);
})();
// 5) Active bundle domain + fallback status
(() => {
const scripts = [...document.scripts].map(s=>s.src).filter(Boolean);
const assets = scripts.filter(u => /assets\d?\.msn\.(com|cn)/.test(u));
const domainCount = assets.reduce((m,u)=>{
const h = new URL(u).host; m[h]=(m[h]||0)+1; return m;
}, {});
console.log(domainCount);
})();
If you’re trying to inject UI (CSP-safe)
You can add no-JS components using semantic HTML. This accordion is safe under TT/CSP and dark-mode aware:
<section class="ntp-acc">
<details open><summary>Section A</summary>
<ul><li>Item 1</li><li>Item 2</li></ul>
</details>
<details><summary>Section B</summary>
<p>Any static, linkable content.</p>
</details>
</section>
<style>
.ntp-acc {max-width: 880px; margin: 16px auto; font: inherit}
.ntp-acc details {border:1px solid #e5e7eb; border-radius:12px; margin:10px 0; overflow:hidden}
.ntp-acc summary {cursor:pointer; padding:12px 14px; font-weight:600; list-style:none}
.ntp-acc summary::-webkit-details-marker{display:none}
.ntp-acc details[open] summary{border-bottom:1px solid #e5e7eb}
.ntp-acc ul{margin:0; padding:10px 18px 14px 28px}
@media (prefers-color-scheme: dark){
.ntp-acc details{border-color:#2a2a2a; background:#1a1a1a}
}
</style>
Handy troubleshooting cues
- Trusted Types violations → look for console logs with IDs around 223306–223310.
- Asset fallback to
assets2.msn.comis automatic if a chunk load fails. - Blank page/timeout (30s) → code will either add
&prerenderTimeout=1or navigate to local NTP. - Audience mode flips to kids if
aaceJSON has{ child:1 }orchildcookie exists.
If you want, I can also:
- extract and format all the flight flags into a neat table,
- generate a minimal bookmarklet to dump diagnostics,
- or build a single-open accordion variant to drop into this shell.
Single-open accordion (only one section open at a time) – SolveForce Communications