【问题标题】:I am facing mod_pagespeed image rename issue while page optimization我在页面优化时面临 mod_pagespeed 图像重命名问题
【发布时间】:2014-10-22 23:00:25
【问题描述】:

我在我的网站上实施了 mod_pagespeed。但它会优化图像,将名称更改为非常长的文件名。这会损害搜索引擎优化吗,因为我从图像搜索中获得了良好的流量。

可以在配置文件中的某个地方阻止此图像重命名。我正在使用最新版本的页面速度(1.8 ...)

非常感谢任何帮助。

【问题讨论】:

    标签: mod-pagespeed


    【解决方案1】:

    我的服务器当前运行的是 PageSpeed 版本 1.8.31.4-4056。在我们的 pagespeed.conf 文件中,我看到以下条目:

    # Many filters modify the URLs of resources in HTML files. This is typically
    # harmless but pages whose Javascript expects to read or modify the original
    # URLs may break. The following parameters prevent filters from modifying
    # URLs of their respective types.
    #
    # ModPagespeedJsPreserveURLs on
    # ModPagespeedImagePreserveURLs on
    # ModPagespeedCssPreserveURLs on
    

    看起来如果您取消注释最后三行,URL 将被保留。然后您必须重新启动 Apache。

    我在这里找到了一些关于设置的文档:https://developers.google.com/speed/pagespeed/module/config_filters#preserveurls

    很遗憾,保留 URL 会禁用其他一些有用的功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-10
      • 2020-03-24
      相关资源
      最近更新 更多