Item14919: make http2/push headers work

pencil
Priority: Enhancement
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: PageOptimizerPlugin
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
My proposal is that, once the HTML code has been generated, the plugin could parse that HTML code for <script src=...>, <link href=...> and <img src=...> statements and generate "H2PushResource" http header line for all files references there (if they reside on the local server). Supposed configuration parameters for the local admin:

  1. Restrict pushing to files of a maximum size (0=push all files, negative value=don't push at all)
  2. Maybe restrict the aggregated total file size
  3. What kind of files shall be pushed: images (.png/.gif/.jpg/.jpeg/.webp), css (.css), javascript (.js), other (everything else)

I've attached some sample code. So far, it has no support for my proposed "aggregated total file size" restriction, but that shouldn't be a big thing.

-- ChristianKern - 03 Jun 2020

And yet another version which has support for pushing small files first. (If there's a maximum aggregated total size, one would probably prefer pushing many small files rather than one big file.)

-- ChristianKern - 03 Jun 2020

One other thing that would be helpful: An option to specify a regular expression that allows to push only elements that reside in certain paths (I'm thinking of /pub/System/ particularly).

-- ChristianKern - 03 Jun 2020

  • ao.pl.txt: improved code: support for $max_aggregated_filesize, more lucid code

  • ao.pl.txt: third version, with support for pushing small files first

  • three_includefiles.tar.gz: The three files whose names the ao.pl.txt script finds in its sample HTML text. Use with max_filesize=8 and max_aggregated_filesize=15.

  • ao.pl.txt: fourth version, with support for path restrictions

 

ItemTemplate edit

Summary make http2/push headers work
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Extension
Component PageOptimizerPlugin
Priority Enhancement
CurrentState New
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
ao.pl.txttxt ao.pl.txt manage 5 K 03 Jun 2020 - 17:45 ChristianKern fourth version, with support for path restrictions
three_includefiles.tar.gzgz three_includefiles.tar.gz manage 218 bytes 03 Jun 2020 - 17:04 ChristianKern The three files whose names the ao.pl.txt script finds in its sample HTML text. Use with max_filesize=8 and max_aggregated_filesize=15.
Topic revision: r7 - 08 Jul 2022, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy