Open PikachuEXE opened 7 years ago
Confirmed on master. Initially the responses look right. Then after a while, the Link:
headers disappear from the responses and do not return again. Restarting nginx does not resolve the problem, but purging the cache does.
In the flow where the Link:
headers are not written, the following code line is hit:
https://github.com/pagespeed/mod_pagespeed/blob/master/net/instaweb/rewriter/push_preload_filter.cc#L95
Which has the comment:
// Stop at first invalid entry, to avoid out-of-order hints.
That explains why the Link:
headers are not written, but I'm not sure this line should actually be hit in this situation: I suspect we end up there after property cache entries expire for the page that are used to remember which assets should be preloaded.
In the first pass and the flows where the Link:
headers are written this line is not hit.
It looks like the first InputInfo
associated to the first Dependency
object in the set that the code loops in PushPreloadFilter::StartDocumentImpl
has expired, and never freshens. This line keeps getting hit: https://github.com/pagespeed/mod_pagespeed/blob/master/net/instaweb/rewriter/input_info_utils.cc#L153
Anything we can do to help solving this issue? I am Rails dev, can't code (or even read) in C :(
Also dunno how to test it quickly after I manage to "fix" it (got test suite?)
@PikachuEXE it would be really helpful if you could confirm the fix once we have one.
To solve this, it looks like the challenge is in figuring out how to correctly trigger revalidation of the cached metadata for the Link:
headers once it has become stale.
In theory it should "just happen" since the filter that computes the prefetch should have exact same invalidation info in its metadata cache entry...
On Tue, Apr 18, 2017 at 6:17 AM, Otto van der Schaaf < notifications@github.com> wrote:
@PikachuEXE https://github.com/PikachuEXE it would be really helpful if you could confirm the fix once we have one.
To solve this, it looks like the challenge is in figuring out how to correctly trigger revalidation of the cached metadata for the Link: headers once it has become stale.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pagespeed/ngx_pagespeed/issues/1408#issuecomment-294765693, or mute the thread https://github.com/notifications/unsubscribe-auth/ADl1RHMKL--enWexZibvgCSfO98FHJ5Xks5rxI3XgaJpZM4M8cXe .
Any updates on this folks? I am seeing the same behavior.
+1 still seeing this behavior
Description
I am unable to see Link headers after enabling
hint_preload_subresources
in nginx (compiled withngx_pagespeed
) Even the example page inside the doc for this filter does not contain any Link header in response https://modpagespeed.com/doc/filter-hint-preload-subresourcesEnv
ngx_pagespeed:
v1.12.34.2-beta
Nginx:1.11.13
Nginx build config:
Page Speed Config in Nginx config file