Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- We identified a significant CLS issue affecting users on Facebook's in-app browser (Android). Your page loads Bootstrap from an external CDN, which arrives ~2 seconds after your own stylesheets. During that window, Bootstrap sets .navbar-fixed-top to position: fixed, pulling the navbar out of the document flow and shifting all page content - before your site CSS corrects it back to position: relative. This causes CLS scores 8–15x worse than in standard browsers (p75 CLS ~1.06 vs ~0.15).
- Fix: add this inline style in <head> before any external <link> tags:
- <style>
- #navbar, .navbar-fixed-top { position: relative !important; top: auto !important; }
- </style>
- This is applied on first render, before any external CSS loads, permanently preventing the shift. No visual change — this is already your intended behavior.
- Expected result: p75 CLS for Facebook WebView drops from ~1.06 to ~0.25.
Advertisement