简体   繁体   English

如何使用从Google PageSpeed Insight下载的优化资源?

[英]How to work with the optimized resources downloaded from Google PageSpeed Insight?

I am working with Wordpress and using child themes. 我正在使用Wordpress并使用儿童主题。 I run Google PageSpeed Insight and downloaded the optimized files (images, CSS, JS) from Google PageSpeed Insight. 我运行Google PageSpeed Insight,并从Google PageSpeed Insight下载了优化的文件(图像,CSS,JS)。

I am not sure where to put the files I downloaded. 我不确定将下载的文件放在哪里。

  1. JS, CSS – I want to continue working with the JS and CSS which are not minified. JS,CSS –我想继续使用未缩小的JS和CSS。 I want the minified files to be created each time I am updating my JS/CSS files. 我希望每次更新JS / CSS文件时都创建缩小文件。 Is that possible? 那可能吗?

  2. There are optimized files belong to the parent theme. 有优化的文件属于父主题。 However, I don't want to change files in my parent theme. 但是,我不想更改父主题中的文件。 Is there a good way to handle this issue? 有没有解决此问题的好方法?

  3. I tried to optimize images using WordPress plugin. 我尝试使用WordPress插件优化图像。 After optimization Google still showing that these images should be optimized. 经过优化,Google仍显示应优化这些图像。 Optimized images which I downloaded from Google PageSpeed Insight are too small to display in desktop. 我从Google PageSpeed Insight下载的优化图像太小,无法在桌面上显示。 I don't understand how should I handle it. 我不知道该如何处理。

You could always use a build task runner to automate your development process. 您始终可以使用构建任务运行器来自动化您的开发过程。 Using web performance plugins such as the ones listed here would allow you to develop and automate your CSS/JS minification, image optimization, etc. 使用此处列出的 Web性能插件可以使您开发和自动化CSS / JS缩小,图像优化等。

A great tool to use is Grunt which allows you to work with your existing Wordpress development workflow. Grunt是一个很好用的工具,它使您可以使用现有的Wordpress开发工作流程。 This means that you only need to run the build tasks once you have finished developing. 这意味着您仅需要在完成开发后就运行构建任务。 There are some great tutorials that show you how to use Grunt with Wordpress development and Grunt too. 有一些很棒的教程向您展示了如何将Grunt与Wordpress开发以及Grunt一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在移动设备上提高 Google PageSpeed 洞察力得分? - How do I increase Google PageSpeed insight Score on mobile? Google Pagespeed Insight:“优化以下内容的CSS交付”。 如何? - Google Pagespeed Insight: “Optimize CSS Delivery of the following”. How to? 如何在Wordpress Pagespeed Insight中解决利用浏览器缓存的问题 - How to solve Leverage browser caching in wordpress pagespeed insight PageSpeed Insight-利用浏览器缓存来获取外部资源 - PageSpeed Insight - Exploit browser caching for external ressources 如何提高从Google PageSpeed Insights获得低分的WordPress WooCommerce网站的性能? - How can I improve the performance of a WordPress WooCommerce website that gets a low speed score from Google PageSpeed Insights? Google PageSpeed阻止某些WordPress页面完全呈现 - Google PageSpeed stops some WordPress pages from rendering fully 优化我的 wordpress 网站以提高我的 pagespeed 洞察力得分 - Optimize my wordpress site to improve my pagespeed insight score Google PageSpeed见解 - Google PageSpeed Insights Google PageSpeed 对 Imagify 不满意 - Google PageSpeed not happy with Imagify 如何优化从 Instagram 请求的图像,以满足 PageSpeed Insights。 - How to optimise images requested from Instagram, to satisfy PageSpeed Insights.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM