IPRO's "s-maxage" header violates Downstream Caching contract (modpagespeed beta 1.12.34.1-0)

66 views
Skip to first unread message

Bruno Negrão Guimarães Zica

unread,
Mar 31, 2017, 5:36:37 PM3/31/17
to mod-pagespeed-discuss, Tribe Performance
Hi,

We're testing modpagespeed 1.12.34.1-0 and we noticed that the 's-maxage' header is being sent permanently for HTML pages and that ruins our configuration for "Downstream Caching".

We enabled the settings bellow:


# Enable IPRO
ModPagespeedInPlaceResourceOptimization on
ModPagespeedInPlaceSMaxAgeSec 10


# Enable Downstream Caching
ModPagespeedDownstreamCachePurgeLocationPrefix http://localhost:80
ModPagespeedDownstreamCacheRebeaconingKey "my_varnish"


The s-maxage header is supposed to be transient and disappear after a resource is optimized. We noticed that's what happens for js/css/images/etc.

But if the response is 'Content-type: text/html', then the 's-maxage' is stuck there in every response.

The test bellow was done creating a simple helloworld.html file in apache's document root directory:

[eceowl@infoccistg5 conf]$ curl -s -D - http://localhost/helloworld.html --header "Host: globostg.globoi.com"

HTTP/1.1 200 OK
Date: Fri, 31 Mar 2017 21:12:21 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Accept-Ranges: bytes
X-Mod-Pagespeed: 1.12.34.1-0
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Cache-control: public, max-age=600, s-maxage=10
Content-Length: 90
Content-Type: text/html; charset=UTF-8

<html>
<header><title>This is title</title></header>
<body>

Hello world

</body>
</html>

That breaks our setup of  Downstream Caching. We don't want varnish to hit apache for every 's-maxage' seconds. We want Varnish to cache the page for "max-age" seconds and have pagespeed to purge varnish's cache on demand.

Why is s-maxage being shown permanently for html pages? Is this a bug?


Otto van der Schaaf

unread,
Apr 1, 2017, 3:24:50 AM4/1/17
to mod-pagespeed-discuss, Tribe Performance
I think you are hitting a bug indeed, I filed https://github.com/pagespeed/mod_pagespeed/issues/1524 for this.

Initially I thought this sounded like https://github.com/pagespeed/mod_pagespeed/issues/1485, but for hitting that you would need to involve LoadFromFile, which you probably do not have.

Otto

- - - - - - - - - - - - - - - - - - - - AVISO IMPORTANTE / IMPORTANT NOTICE - - - - - - - - - - - - - - - - - - - - - -

Esta mensagem pode conter informações confidenciais e somente o indivíduo ou entidade a quem foi destinada pode utilizá-la. A transmissão incorreta da mensagem não acarreta a perda de sua confidencialidade. Caso esta mensagem tenha sido recebida por engano, solicitamos que o fato seja comunicado ao remetente e que a mensagem seja eliminada de seu sistema imediatamente. É vedado a qualquer pessoa que não seja o destinatário usar, revelar, distribuir ou copiar qualquer parte desta mensagem. Ambiente de comunicação sujeito a monitoramento.



This message may include confidential information and only the intended addressee have the right to use it as is, or any part of it. A wrong transmission does not break its confidentiality. If you've received it because of a mistake or erroneous transmission, please notify the sender and delete it from your system immediately. This communication environment is controlled and monitored.



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/7ccc907c-cdf3-43f3-a4ad-3d89e65eaa28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruno Negrão Guimarães Zica

unread,
Apr 3, 2017, 9:48:43 AM4/3/17
to mod-pagespeed-discuss, Tribe Performance
Otto, we are not using LoadFromFile.

Thank you for opening the issue.

Regards,
bruno

Atenciosamente,

Bruno Negrão Guimarães Zica
Diretoria de Gestão
Tecnologia

Tel.: 55 (21) 2534-5053
Cel.: 55 (21) 988780090

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/oAO9bopXoUY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAHqmWiPNXj1%3Ddgd5w_izuig657%2BNqTQmoHC6D-D7w3FaC%2BUHkg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Bruno Negrão Guimarães Zica

unread,
Apr 7, 2017, 4:32:01 PM4/7/17
to mod-pagespeed-discuss, h5m9n3v5...@igeg.slack.com
Otto, can you turn this bug into a feature? It would be amazing if the s-maxage header was applied correctly to html pages.

I want to be able to set an s-maxage header on html pages that are not fully optimized. When the page has completed optimization the s-maxage header will disappear.

Like what pagespeed does with the setting "ModPagespeedDownstreamCacheRewrittenPercentageThreshold", the s-maxage header should disappear from html responses if the html is more than X% optimized.

I think that would be a simple and elegant solution to deal with caches in front of pagespeed.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages