How is loadfromfile/match reported in log file.

20 views
Skip to first unread message

Nigel Aves

unread,
Dec 26, 2020, 12:25:34 PM12/26/20
to mod-pagespeed-discuss
How can I tell from the log file that a resource is being loaded with loadfromfile / match? Rather than a HTTPS fetch.

In the log file all I see is https://url-to-resource:  Shrinking image https://url_to_actual_resource 

I don't suppose there's a test program that looks at the sanity of the rules defined, and would they would actually work as expected. 

Anyways, any help in this area would be gratefully appreciated.

Happy Hols to all, stay safe.  Nigel.

Otto van der Schaaf

unread,
Dec 26, 2020, 4:26:49 PM12/26/20
to mod-pagesp...@googlegroups.com
As far as I know, LoadFromFile isn't reporting any log messages on its own.
A utility to visualize how input urls would be routed, and maybe even test that route, would be nice But today that is not available.

Thinking about it, at the surface it seems that a standalone binary based on https://github.com/apache/incubator-pagespeed-mod/blob/master/pagespeed/automatic/static_rewriter.cc for this could be doable and helpful.
I recon inputs would be the url of the html that gets rewritten, and then configuration that manipulates routing/domain authorization. Then one would hand it some html with to-be-fetched and rewritten resource links, and the tool would show log lines that indicate what happened with respect to https(s)fetching, ip resolution, and/or LoadFromFile. 

--
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/85e20186-ff1f-40dd-a2a0-9c83e21da22an%40googlegroups.com.

Nigel Aves

unread,
Dec 27, 2020, 2:54:51 PM12/27/20
to mod-pagesp...@googlegroups.com
It would be a very useful tool to have in the old tool box. Unfortunately I'm no programmer.

I found a really messy workaround. I set a very different cache time for loadfromfile, then by looking at the header information for "cache", I could tell where / how the resource was being loaded. The downside of this is that I use Joomla / PIWIGO as my CMS and there can be a number of loadfromfile's needed, especially as some of the templates stick stuff everywhere! ;) 

Nigel.

Reply all
Reply to author
Forward
0 new messages