element-timing icon indicating copy to clipboard operation
element-timing copied to clipboard

url getter special cases data: URLs

Open annevk opened this issue 4 years ago • 2 comments
trafficstars

Why special case data: URLs? Other URLs can be thousands of code points as well...

annevk avatar Oct 22 '21 11:10 annevk

Is that common though? The thinking was to align with Resource Timing on URLs that are fetched (that API does not trim URL names) but to not store the enormous URL for inline images which are in data: URLs.

npm1 avatar Oct 25 '21 14:10 npm1

If we wanted to consistently truncate all URLs, rather than to rely on a convention which works well most but not all of the time, we discussed some options today:

  • Truncate all URLs, but increase the number of codepoints to something larger, like 1k-4k
  • Truncate all URLs to 100 code points-- but then also add a hash of the full URL
  • Change to only return a hash of the URL

mmocny avatar Nov 15 '21 16:11 mmocny