gpt4 book ai didi

pagespeed - 为什么 pagespeed 模块要添加 eval()?

转载 作者:行者123 更新时间:2023-12-01 13:45:26 26 4
gpt4 key购买 nike

我通过我的 cPanel 在我的网站上激活了 Google PageSpeed 模块,我的网站现在似乎快了很多,但我注意到它增加了很多:

<script>eval(mod_pagespeed_123ABC);</script>
<script>eval(mod_pagespeed_456DEF);</script>

ETC..

有谁知道他们为什么需要在那里以及是否有办法删除它们?

最佳答案

这是“组合 JavaScript”(combine_javascript)设置。
https://developers.google.com/speed/pagespeed/module/filter-js-combine#configuration

'Combine JavaScript' seeks to reduce the number of HTTP requests made by a browser during page refresh by replacing multiple distinct JavaScript files with a single one.

This filter employs the Javascript 'eval' expression to evaluate each tag at its proper location in the DOM, but getting the aggregated script content in one HTTP fetch. The effects of this are likely to differ between browsers, and haven't yet been thoroughly measured.

关于pagespeed - 为什么 pagespeed 模块要添加 eval()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36393411/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com