神秘的 Magento 压缩

发布于 2024-12-03 12:33:41 字数 645 浏览 1 评论 0原文

我需要 Magento 大师的帮助。我的网站似乎压缩并组合了 CSS 和 JS 文件,我正在尝试将其关闭(因为更改 CSS/JS 需要很长时间)。压缩文件名看起来像这样:

default,_default,_css,_styles.css+base,_default,_css,_widgets.css+default,_default,_ajaxcartpro,_css,_styles.css.pagespeed.cc.m7pIpU44Ks.css

prototype.js.pagespeed.ce.0jGH1h95bT.js

在查看了一些 StackOverflow 答案后,这让我认为它是 mod_pagespeed 。但是,我在 FTP 中找不到 mod_pagespeed (我使用 SFTP 进行检查,它不在 etc/apache2/mods-available 中,如 mod_pagespeed 文档所示。Magento 自己的缓存系统已被禁用,但似乎并没有 。

(一个小背景故事:在前一个机构救助他之后,客户来找我继续这个项目。我试图联系那个机构,但他们似乎很不乐意 不专业,所以我需要通过其他方式找到这个问题)

。 1)有谁知道其他Magento模块可以压缩文件吗?
2)或者它实际上使用的是Pagespeed,也许我正在寻找错误的区域?

I need some help from the masters of Magento over here. My site seems to compress and combine CSS and JS files, and I'm trying to turn it off (because it takes forEVER to make CSS/JS changes). The compressed filenames look like such:

default,_default,_css,_styles.css+base,_default,_css,_widgets.css+default,_default,_ajaxcartpro,_css,_styles.css.pagespeed.cc.m7pIpU44Ks.css

prototype.js.pagespeed.ce.0jGH1h95bT.js

Which made me think that it was mod_pagespeed after looking at some StackOverflow answers. However, I can't find mod_pagespeed in my FTP (I used SFTP to check, it's not in etc/apache2/mods-available as the mod_pagespeed documentation suggests. Magento's own cacheing system has already been disabled, but it doesn't seem to change anything.

(A little backstory: the client came to me to continue the project after the previous agency bailed out on him. I've tried to contact that agency, but they seem to be quite unprofessional about it. So I need to find this out some other way).

My Questions:
1) Does anyone know of other Magento modules that would compress the files as such?
2) Or is it actually using Pagespeed and perhaps I'm looking in the wrong area?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆沫 2024-12-10 12:33:41

不知道在没有安装 mod_pagespeed 的情况下如何获得它。这绝对是mod_pagespeed的结果。

不知道你是如何安装它的,我无法帮助你如何删除它,但如果你将初始 Cache-Control: max-age 设置为更短,mod_pagespeed 会更快地更新你的更改。假设您将其设置为 300 秒,您的资源将在 5 分钟内更新。

No idea how you're getting that without mod_pagespeed installed. It is definitely the result of mod_pagespeed.

Not knowing how you installed it, I can't help you with how to remove it, but if you set the initial Cache-Control: max-age to shorter, mod_pagespeed will update you changes faster. Say if you set it to 300 seconds, your resource will be served updated within 5min.

太阳公公是暖光 2024-12-10 12:33:41

您可以:

  • 通过将以下内容添加到 pagespeed.conf 来禁用 pagespeed:

    ModPagespeed 关闭
    
  • 将 pagespeed 设置为忽略 rewrite_css 和 rewrite_js (https://developers.google.com/speed/pagespeed/module/config_filters)
  • 加载禁用 pagespeed 的网址:即: ...com/?ModPagespeed=off
  • 刷新页面速度缓存:

    sudo /bin/touch /var/mod_pagespeed/cache/cache.flush
    

好的资源:

https://developers。 google.com/speed/pagespeed/module/configuration

https://developers.google.com/speed/pagespeed/module/filters

https://developers.google.com/speed/pagespeed/module/faq

另外,您可以关闭 Magento 的缓存,这样您就不必一直刷新缓存。

You can:

  • disable pagespeed by adding the following into the pagespeed.conf:

    ModPagespeed off
    
  • set pagespeed to ignore the rewrite_css and rewrite_js (https://developers.google.com/speed/pagespeed/module/config_filters)
  • load the url with pagespeed disabled: ie: ...com/?ModPagespeed=off
  • flush pagespeed cache:

    sudo /bin/touch /var/mod_pagespeed/cache/cache.flush
    

Good resources:

https://developers.google.com/speed/pagespeed/module/configuration

https://developers.google.com/speed/pagespeed/module/filters

https://developers.google.com/speed/pagespeed/module/faq

Also, you can turn off Magento's cache so you don't have to flush cache all the time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文