Next step in our journey after Part 1 Caching and Part 2: Aggregation of our ultimate guide to Drupal performance is all about Drupal theming and this will be our part 3
The next part will be some general tips and tricks about CSS/JS and then we will release a full blown article containing all parts. so lets cut the intro and get right into it.
rel='preload' and yes you can use <link> for scripts as well - ResourceIn order for the browser to display your web page and use the styles you specified in the external CSS files, it has to load them first. This means that your web page won't be displayed until these files are loaded. In order to speed up the loading of your website, you can inline the parts from the external CSS files which are needed to render the above the fold content. After loading the page you can instruct the browser to load the rest of the CSS files via JS - There are many tools that you can use to achieve this but this one explains good enough and works: https://www.sitelocity.com/critical-path-css-generator
Also, check penthouse as well, Can be set up easily as a task runner task!
https://www.npmjs.com/package/penthouse - includes CSS for critical path above the fold in the HTML head.
Our very own Sven played around with both penthouse and critical and let me just quote him in our slack chat here:
Sven Berg Ryan
criticalis a wrapper forpenthousewith the main advantage that it deliverscritical cssfor several breakpoints in one file.
Note: To generate critical css, link_css module must be enabled, and you can not be using deter CSS loading in AdvAgg, otherwise you get an empty file. (Needs testing)
Critical_css module on Drupal
document.write specifically for scripts injection - ResourceMost AI writing tools live in another browser tab. You copy text out, write a prompt, copy the answer back and fix the formatting. We wanted to get rid of that loop for people who write in Drupal. Gutenberg AI is the product we are building to fix that. It brings AI into the Gutenberg block editor, right next to the content it works on.
Enda raskere, klar for AI og bygg sider uten kode, les hva som er nytt i Drupal 11!
Er du lidenskapelig opptatt av salg og har erfaring fra offentlige anbud? Vi ser etter en proaktiv, strategisk person til å bli med i teamet vårt og forbedre salgsarbeidet vårt. Er det du?
Offentlig sektor flyter over av kunnskap – fra utredninger til evalueringer. Utfordringen har lenge vært å finne denne informasjonen i havet av PDF-er. Ramsalt har vært sentral i utviklingen av Kudos – en nasjonal kunnskapsportal. Ved å implementere banebrytende KI-basert dokumentanalyse, har vi bidratt til å snu en kaotisk dokumentbase til en gullgruve av søkbar innsikt.