【问题标题】:How to remove 'Optimize CSS Delivery' message for my website.如何为我的网站删除“优化 CSS 交付”消息。
【发布时间】:2023-03-31 18:46:01
【问题描述】:

我正在使用https://developers.google.com/speed/pagespeed/ 来确定我的页面速度。我可以看到: 您的网页有 11 个阻止 CSS 资源。这会导致呈现页面的延迟。 页面上大约 5% 的首屏内容可以在不等待以下资源加载的情况下呈现。尝试延迟或异步加载阻塞资源,或直接在 HTML 中内联这些资源的关键部分。

http://jegeachi.com/…in-with-ajax/widget/widget.css?ver=3.1.7
http://jegeachi.com/…-form-validation/css/style.css?ver=4.9.4
http://jegeachi.com/…validation/css/fonts/style.css?ver=4.9.4
http://jegeachi.com/…rontier-post/frontier-post.css?ver=4.4.1
https://fonts.googleapis.com/css?family=Open+Sans&ver=4.9.4
http://jegeachi.com/…-and-share/assets/css/styles.css?ver=3.3
http://jegeachi.com/…more-without-refresh/style.css?ver=4.9.4
http://jegeachi.com/…includes/css/dashicons.min.css?ver=4.9.4
https://maxcdn.bootstrapcdn.com/…4.7.0/css/font-awesome.min.css?ver=2.4.2
http://jegeachi.com/…ular-posts/public/css/wpp.css?ver=4.0.13
http://jegeachi.com/…ootstrap/css/bootstrap.min.css?ver=1.0.1

我手动压缩了所有这些 css 文件,但仍然可以看到相同的消息。我该怎么办?

注意:我正在使用 wordpress 和 Apache 服务器。

【问题讨论】:

  • 您应该首先缩小未缩小的文件。您还加载了混合的 HTTP 和 HTTPS 流量,这将产生安全警告。此外,这个问题之前至少被问过十次;您可能想尝试其中的一些建议。

标签: css


【解决方案1】:

我建议 loadCSS 异步加载 CSS 以避免渲染阻塞。

<link rel="preload"> 为您执行此操作,但并非所有浏览器都支持。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-22
    • 1970-01-01
    • 1970-01-01
    • 2013-10-25
    • 2014-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多