A wordpress website, to improve the performance of google pagespeed, moved all styles and scripts to the footer using this code:

function footer_enqueue_scripts(){ remove_action('wp_head','wp_print_scripts'); remove_action('wp_head','wp_print_head_scripts',9); remove_action('wp_head','wp_enqueue_scripts',1); add_action('wp_footer','wp_print_scripts',5); add_action('wp_footer','wp_enqueue_scripts',5); add_action('wp_footer','wp_print_head_scripts',5); } add_action('after_setup_theme','footer_enqueue_scripts'); 

which is added to functions.php .
In the code inspector, all styles and scripts in the footer.
As a result, it worked on mobile phones, i.e. Pagespeed does not produce optimization suggestions "Remove the JavaScript and CSS code that blocks the display of the top of the page."
But on the desktop version there is this proposal, i.e. it turns out on the mobile version, the styles and scripts have moved to the footer, but not on the desktop version.
Although if you look in the code inspector, all styles and scripts in the footer.
How can this be? Why when all styles and scripts in the footer, for pagespeed, they are still in the head?
For mobile phones figure 75, for desktop 45

  • I hope you even made a preloader? PageSpeed ​​may not immediately update the information. - DaemonHK
  • @DaemonHK, but what’s the preloader here, the page loads in almost a second, and the preloader is not needed. He doesn’t play a role here, he added critical styles to the header, so that the content was immediately drawn, and all the basic styles in the footer were the word
  • For a second, where is it? On your LAN? - DaemonHK
  • @DaemonHK, is it a question about the download speed? the more I said above that I added critical styles for preloading - word
  • It's okay, all the controversy) 3 days have passed, Google had to update the information already a hundred times, how is it going? - DaemonHK

0