S
S
Sergey Khlopov2021-06-09 08:31:55
Laravel
Sergey Khlopov, 2021-06-09 08:31:55

How to embed critical css in Laravel?

Hello, tell me please, there is a project on Laravel 5.2.
Google pagespeed says "Remove render-blocking resources".
As I understand it, critical css rules need to be moved to <head>, and the css file itself should be connected asynchronously.

The question is how to do it in Laravel? For example, the critical
tool . It will not insert css files into the view. I just thought maybe I could make critical generate a critical styles file, and then manually copy these styles into <head>, maybe that's an option.
Please tell me how can I do it?

Thank you in advance for your response

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-06-09
@Shlop

critical generated a critical styles file, and then manually copy those styles
Why copy by hand when the contents of the file can be read and appended programmatically?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question