Cloudflare 没有缩小我的页面(我已经阅读了文档)

Cloudflare is not minifying my page (I've read the documentation)

提问人:Rodrigo 提问时间:11/17/2023 更新时间:11/17/2023 访问量:17

问:

我已经彻底查看了文档,验证了设置,清除了缓存,并等待更改生效。

https://developers.cloudflare.com/speed/optimization/content/troubleshooting/auto-minify-not-working/

我有一个简单的网页。根据文档,有三种工具可用于不同类型的资产,我的代码符合这三种工具的标准。但是,Cloudflare 根本没有缩小我的页面。我做错了什么?

页数: https://play.carimbo.cloud/0.0.47/carimbolabs/snake/0.0.13

法典:

<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <base href="{{.BaseURL}}" />
  <link rel="preload" href="bundle.7z" as="fetch" type="application/octet-stream" crossorigin />
  <link rel="preload" href="carimbo.wasm" as="fetch" type="application/wasm" crossorigin />
  <title>Carimbo</title>
  <style>
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }

    .container {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #canvas {
      width: 854px;
      height: 480px;
    }
  </style>
</head>

<body>
  <div class="container">
    <canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
    <script>
      const canvas = document.getElementById("canvas");

      var Module = {
        canvas,
        noInitialRun: true,
        onRuntimeInitialized: () => {
          fetch("bundle.7z")
            .then((response) => response.arrayBuffer())
            .then((data) => {
              const uint8View = new Uint8Array(data);
              FS.writeFile("/bundle.7z", uint8View);
              Module.callMain();
            });
        },
      };
    </script>
    <script src="carimbo.js"></script>
  </div>
</body>

</html>

设置:

enter image description here

enter image description here

Javascript HTML CSS Cloudflare

评论


答: 暂无答案