On Fri, Mar 11, 2016 at 6:54 AM, Julian Matz <
julia...@netlink.ie> wrote:
> I'm having the same problem on Debian 8 with Apache 2.4.10.
>
> Other .htaccess directives are working fine. To test, I added just the
> following lines to my .htaccess files:
>
> ModPagespeed off
> ModPagespeedModifyCachingHeaders off
>
> However, when I view the HTTP headers, I still see the header:
>
> X-Mod-Pagespeed:·1.9.32.13-0
>
> I also tried adding these to my VirtualHost config. Same problem.
> ModPagespeed can only be turned of in
> /etc/apache2/mods-enabled/pagespeed.conf but then, it cannot be turned on in
> .htaccess or vhost conf.
>
> Is it a bug? Any solutions?
>
Here's what's supposed to happen, and what I see happening on
modpagespeed.com:
$ cat mps-on/index.html
<h1> Foo </h1>
<h2> Bar </h2>
$ cat mps-on/.htaccess
ModPagespeedEnableFilters collapse_whitespace
$ curl -D-
www.modpagespeed.com/jefftk/mps-on/
HTTP/1.1 200 OK
Date: Fri, 11 Mar 2016 15:55:10 GMT
Server: Apache/2.4.7 (Ubuntu)
Accept-Ranges: bytes
X-Mod-Pagespeed: 1.10.33.5-0
Cache-Control: max-age=0, no-cache
Content-Length: 38
Content-Type: text/html
<head/><h1> Foo </h1>
<h2> Bar </h2>
And then with PageSpeed off:
$ cat mps-off/index.html
<h1> Foo </h1>
<h2> Bar </h2>
$ cat mps-off/.htaccess
ModPagespeedEnableFilters collapse_whitespace
ModPagespeed off
$ curl -D-
www.modpagespeed.com/jefftk/mps-off/
HTTP/1.1 200 OK
Date: Fri, 11 Mar 2016 15:55:13 GMT
Server: Apache/2.4.7 (Ubuntu)
Last-Modified: Fri, 11 Mar 2016 15:54:58 GMT
ETag: "30-52dc7f3fcffe4"
Accept-Ranges: bytes
Content-Length: 48
Content-Type: text/html
<h1> Foo </h1>
<h2> Bar </h2>
You can see that when the .htaccess file says "ModPagespeed off" then
PageSpeed doesn't run and so doesn't insert the X-Mod-Pagespeed header
or remove the whitespace.
Could you send me your .htaccess file? Directly to
jef...@google.com
if you're not up for posting it publicly?
Jeff