- This topic has 11 replies, 3 voices, and was last updated 5 years ago by
Tom.
-
AuthorPosts
-
March 11, 2021 at 10:53 am #1691597
Longinos
Hi there
I´ve upgraded to GPP 2.0.0-alpha3 and now I have CLS in the 1st element of the page. Now this 1st element is secondary navigation, but if changed to primary navigation, then the cls is here.
Have a GenerateBlock element tyoe Page Hero and use autoptimize to inline all css.
Test I have done:1.- Don´t inline all css, combine all files (not the inlined css) -> no cls
2.- Don´t put the GenerateBlock w7 and w/o all css inlined -> no clsI´ve provided 2 url. Number 1 is the site with gpp upgraded (and cls issue), number 2 is a site w/o gpp upgraded (is gpp 2.0.0-alpha2), site structure is similar in both.
Some clue? Can I made some test?
March 11, 2021 at 9:40 pm #1691988Elvin
StaffCustomer SupportHi there,
Have you sorted this out?
I’ve ran both sites on Google PSI and both yield 0 CLS.
First link – https://share.getcloudapp.com/9Zu81Z17
Second link – https://share.getcloudapp.com/Qwu9Zpm6Let us know.
March 12, 2021 at 11:06 am #1692888Longinos
Hi Elvin
In the first site we have changed to use autoptimize file, so not css inlined for now.
I will change it to inline css and then have CLS in navigation so you can test.
And you need to look at the Lab Data, not the Origin Summary, these changes 1 time each moth.P.D. You need to check the desktop version. In mobile version no navigation bar is showed, so no cls.
March 13, 2021 at 9:19 am #1693856Tom
Lead DeveloperLead DeveloperHi there,
Are you sure the Page Hero has any effect on this? I’m not seeing how it would be connected.
If it’s something in the navigation, the best thing you can do is un-pick the navigation by removing items one by one to see if one is causing it.
March 13, 2021 at 11:07 am #1693962Longinos
Hi Tom
I say it (the hero page element) as informational only.
Is the secondary nav. If I unset the secondry nav and let only the primary, no cls.
No matter what number of elements have in the secondary menu.
If the primary is in the off canvas panel, then no cls.
So the cls is when 2 menus are on top of page.P.D. No cls whit LH in chrome. PSI report cls with the 3bar icon of the off canvas.
P.D. 2: I´ve swiched to use autoptimize files, don´t inline it. CLS have a bigger ipact on score thant have 1 critical chain.March 14, 2021 at 10:38 am #1694917Tom
Lead DeveloperLead DeveloperSo right now I’m seeing 0 CLS on both pages – is this because you removed the menu items?
What if you add menu items without dropdown menus?
March 14, 2021 at 11:48 am #1694987Longinos
Hi, Tom
No, it is because I´ve switched from inline all css to get all css unified in 1 file.
Now the pages have 1 big css file (17Kb) and some css inlined like generate-style-inline-css or generate-secondary-nav-inline-css.The CLS comes when secondary navigation is in header and all css is inlined.
In this condition the elements origin of the CLS are:
div.inside-navigation.grid-container.grid-parent and div.inside-navigation.grid-container
If the primary menu is moved to the offside canvas, then some times have cls in and some times not, in the element <span class=”gp-icon icon-menu-bars”>.In all cases if the css are in a file then no cls.
Seem like whe all css is inlined the order and/or the speed that css is applied are diferent than when the css is in a file.
I´ve decided switch to use file because the impact in rating of cls is bigger than that having chaining of critial request (1, the css file)
Sorry for my very bad english.
March 15, 2021 at 8:48 am #1696196Tom
Lead DeveloperLead DeveloperStrange, the only reason I could see inlining being a CLS issue is if it was being loaded too late/not in the
<head>. I’m not sure why there would be a difference between the CSS being in a file vs. inline if they’re both loaded in the same area.Either way, nice to see the 0 CLS score – performance looks great 🙂
March 15, 2021 at 12:55 pm #1696431Longinos
Yes, when the css is inlined is at the same point that the autoptimize css file, in the head.
Maybe some thing related to centered alineation with flex?March 16, 2021 at 8:36 am #1697651Tom
Lead DeveloperLead DeveloperNot sure how that would affect it really. The CSS should be identical whether it’s inline or in a file. Maybe the file is deferred?
March 16, 2021 at 9:11 am #1697714Longinos
No, the file is not deferred in any way. But the inlined css takes less time that a file. The file need time to conection, download and apply the css.
But is only a hipotesis trying to explain the isue.March 17, 2021 at 8:31 am #1699096Tom
Lead DeveloperLead DeveloperVery strange indeed. I’ll keep an eye out for similar issues.
-
AuthorPosts
- You must be logged in to reply to this topic.