Skip to content

move fetch nav to eager scripts#494

Open
rrusher wants to merge 2 commits into
mainfrom
fetch-nav-eager
Open

move fetch nav to eager scripts#494
rrusher wants to merge 2 commits into
mainfrom
fetch-nav-eager

Conversation

@rrusher

@rrusher rrusher commented Oct 22, 2024

Copy link
Copy Markdown
Collaborator

The nav is loading slowly. Trying to move the load up.

Test URLs:

@rrusher rrusher self-assigned this Oct 22, 2024
@aem-code-sync

aem-code-sync Bot commented Oct 22, 2024

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Oct 22, 2024

Copy link
Copy Markdown
Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Comment thread scripts/scripts.js
async function loadEager(doc) {
setPageLanguage();
decorateTemplateAndTheme();
fetchLanguageNavigation(`/${getLanguage()}`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rrusher why It's important to call navigation in eager?

@thomsebastin thomsebastin Oct 23, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkbansal1 I believe by the time header loads, navigation items will be ready. Now, weather to load it in lazy vs eager might be debatable. If loading it in eager isn't impacting the score (which I think it isn't looking at the score), then I think it is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants