P
P
Pogran2016-07-15 13:22:50
Google
Pogran, 2016-07-15 13:22:50

How to make optimization for google padeSpeed ​​code at the top?

how to optimize in google padeSpeed ​​https://developers.google.com/speed/pagespeed/insights/ here is this paragraph "Remove JavaScript and CSS blocking the display of the top of the page" . The point is that asset is connected by default. And it turns out that all styles are thrown into the header, but js is displayed at the end. How do you properly solve this issue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-07-15
@qonand

css in yii are connected only in the head section, there is no possibility to configure the connection location.
the renderHeadHtml method of the \yii\web\View class is responsible for the connection process itself - therefore, as an option, inherit from View and implement the functionality you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question