General Asset Configuration

Hi, I have tested my website, it’s fast cz i’m using redis as cache. but when i’m testing with GTMetrix it’s give me grade E … some improvement like this

by default, we can put css or js in asset configuration, but we can’t add more tags prop like disable, media, async how we do in Grav?


You can use async, defer and inline. Not sure about others

Give the link to your web site. I guess it has more in common with how is your web site build like, than with the Grav itself.

oke, here

thanks for your suggestion.

@topidesta, More interesting than the generated output of Asset Manager, would be, IMHO, its input…

  • How do you add assets?
  • How do you render assets?
  • What are your asset settings in system.yaml?
  • What are the results?
  • Anything else you have in place that might influence the output of Asset Manager?

Please provide code snippets (not screenshots).

It’s loading quite fast, and current GTmetrix grade is B, so I guess you’ve been fixing it already.

IMHO you’re losing some points because of the overuse of animations that affect rendering of the page (I’m talking about the HP).

Are you sure you need all that assets that slow down rendering? HP is relatively easy, could be done with a few lines of Grid CSS, no need to load the whole Bootstrap just for it. BTW: you can safely switch off some of the Grav plugins CSS as well (notices, login etc.).

the result GTMetrix is not same, some times B, some times C or E. the animations is default of theme i purchased before.

how i do safetyl switch off some style with Grav? any plugin can do this? or manual one-by-one with inspect element.

btw thanks for your suggestion, but the site still development, not ready to change existing site.

ah, i missed thats point, js-async: thanks!

Well, I still think the problem isn’t with Grav itself, but the way the template is build. You use a lot of resources that are split into many singular files.
I code every template myself and try to minimalize unnesessary code, HTTP requests etc. I achieve PageSpeed Insights results above 90 quite easily.

ah i see, the template it self. may i try remove some style not needed manualy? or may i just select css with spesifict page?