Load Custom CSS Before Native Rendering to Prevent Design Flash
O
Oscar Eduardo Cantu
We'd like SmartDirectoryAI to support applying essential custom CSS and layout before the native page becomes visible.
SDAI's development team confirmed that code saved under Settings → Custom Code → Header Code is injected after native rendering begins. Consequently, visitors briefly see the original SDAI design before our customized design appears.
This is particularly noticeable on our homepage, but it also affects our Pricing/Plans page. The behavior occurs on both preview and connected production domains.
Requested enhancement:
- Allow critical custom CSS to load with the initial HTML, before the first visible render.
- Where feasible, support applying custom layout changes before native content becomes visible.
- Prevent the native-to-custom design flash during full page reloads and internal navigation.
- Preserve existing SDAI functionality and compatibility with Custom Code.
A possible approach, as suggested by the development team, would be server-rendering critical custom CSS into the initial HTML.
This would significantly improve the professional appearance and user experience of directories using SDAI's customization capabilities.
Thank you for considering this enhancement!
Merrell Gray
"On theocalalist.com, listing pages now send their title, meta description and canonical in the first HTML. Thank you for the Oct 2 update. But the page body and the LocalBusiness schema still appear only after JavaScript runs, and home, category and blog pages have no server-side content at all. Google Search Console shows 81 of our pages as Discovered, currently not indexed (Nov 16).
For a directory, getting found on Google is the whole deal. Our members pay us to be found, and right now Google can't fully read the pages we build for them. Please server-side render listing bodies, LocalBusiness schema, category pages and blog posts so Google can index them without running JavaScript. That one change would help every directory on the platform get picked up by Google."