Currently Phast uses full URLs to request resources from the bundler, along with a signature and a cache salt. This leads to quite long URLs that don't always fit in a single TCP packet, leading GTmetrix to complain, rightly.
Instead, we could generate an ID number for each resource encountered in the document, and use that ID number when retrieving the resource.
During document handling
Look up any existing ID for a resource by URL and cache salt
If no ID is found, generate a new one by encoding a certain amount of random bytes
On the frontend
Attempt to retrieve a resource using its ID
If that doesn't work, fall back using the existing logic
Currently Phast uses full URLs to request resources from the bundler, along with a signature and a cache salt. This leads to quite long URLs that don't always fit in a single TCP packet, leading GTmetrix to complain, rightly.
Instead, we could generate an ID number for each resource encountered in the document, and use that ID number when retrieving the resource.