From dev-return-3107-archive-asf-public=cust-asf.ponee.io@pagespeed.apache.org Thu Mar 5 09:36:33 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2B29A180667 for ; Thu, 5 Mar 2020 10:36:33 +0100 (CET) Received: (qmail 43573 invoked by uid 500); 5 Mar 2020 09:36:32 -0000 Mailing-List: contact dev-help@pagespeed.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pagespeed.apache.org Delivered-To: mailing list dev@pagespeed.apache.org Received: (qmail 43554 invoked by uid 99); 5 Mar 2020 09:36:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2020 09:36:32 +0000 From: GitBox To: dev@pagespeed.apache.org Subject: [GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1681: Uncacheable content, preventing rewriting of image Message-ID: <158340099245.14737.6099355072981372714.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Thu, 05 Mar 2020 09:36:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lofesa edited a comment on issue #1681: Uncacheable content, preventing rewriting of image URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1681#issuecomment-595124972 Well... In the LoadfromFile path some others directives must be set. Why don´t simplyfy? ``` ModPagespeedLoadFromFile "https://www.weedstreet420.com/" \ "/var/www/vhosts/weedstreet420.com/httpdocs/web/" ``` Some rules you can test: `ModPagespeedLoadFromFileRuleMatch Disallow .*` # (this disallow all files) `ModPagespeedLoadFromFileRuleMatch \.(js|css|jpg|jpeg|png|pdf|gif)$` (This allow any file with these extensions. You need to change to extensions files you use) The order of these directives make sense. `ModPagespeedLoadFromFileCacheTtlMs 604800000` When you load files from disk, these don´t have any http headers, with this directive, you set the ttl for a week (the time you put here is in miliseconds)... is like cache-control: 604800000. Find the docs from these directives and set it to fit your need. Now you can see some images still unoptimized, like organigram-holdings-inc-potstock-cannabis-investing.png. That is a spected behaviour. These files uses data-srcset and these label is not optimized. Take a look at the html code. You can see that srcset behind the nonscript tag are rewrited, or data-src, but not the data-srcset. In the pagespeed version you use, data-srcset are not optimized. A new version is next to public release (v1.14.36.1) with this version data-srcset is optimized too. With LoadFromFile, each request run stat() to check the file, if the file changes, pagespeed reload it again. Good luck. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services