L
L
laitPro2020-10-22 11:57:04
Java
laitPro, 2020-10-22 11:57:04

Critical css java module (LifeRay)?

It is necessary to embed the critical css inline in the head into the page, load the rest of the styles asynchronously so as not to block the rendering of the page and draw the first screen as quickly as possible.
You have to do it on the fly. That is, the option with pre-generation of such styles is not suitable. There are a lot of pages + they change content every time by admins.

Is there a java module that catches the request, generates the critical css for the page, embeds it in the head and sends the response to the client?
https://asmen.icopy.site/awesome/critical-path-css... here are existing solutions

There are modules for php ruby, but I can't find them for java.

The libraries I found for parsing DOM and css are written in js.
I see only one option - to raise another server, only on the node, to lay the logic for generating critical css there. And from the java server, access node.

Do you have any thoughts on this issue, MB any advice? A ready-made solution is not needed, of course. What matters is the direction in which you can go in order to achieve your goal.

Maybe someone had experience writing such a module in java? Please share what you can.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question