Page MenuHomePhabricator

Report image size
Closed, ResolvedPublic

Description

Browsers that support the Resource Timing v2 has the ability to get the size of every resource response (not for the main page, there we need the Navigation Timing v2) so we can calculate the total size. Firefox 45 supports RT v2 and Chrome has it in it's timeline.

The Performance inspector can then show the total size, image sizes and warn for large assets (=images larger than X kb).

Lets use the Resource Timing V2 where it's available, for other browsers we do a request extra for each URL and check the headers for the right size.

Event Timeline

Peter created this task.Nov 9 2015, 12:36 PM
Peter claimed this task.
Peter raised the priority of this task from to Needs Triage.
Peter updated the task description. (Show Details)
Peter added a project: Performance-Team.
Peter added subscribers: Gilles, aaron, Krinkle and 3 others.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 9 2015, 12:36 PM
Peter triaged this task as Medium priority.Feb 10 2016, 7:54 AM
Peter renamed this task from Count number of images and image weight to Report page and image size.Mar 22 2016, 8:42 AM
Peter updated the task description. (Show Details)
Peter removed subscribers: ori, Aklapper, Krinkle and 3 others.
Peter updated the task description. (Show Details)Apr 21 2016, 6:41 PM
Peter renamed this task from Report page and image size to Report image size.Apr 25 2016, 9:01 AM
Peter updated the task description. (Show Details)

Change 284887 had a related patch set uploaded (by Krinkle):
Use Ajax request to fetch image size

https://gerrit.wikimedia.org/r/284887

Peter added a comment.Jun 2 2016, 6:54 PM

Been discussing this with @Krinkle: Lets use ajax fetching for all browsers for now. Using the resource timing API for Firefox do not include local cache hits and that will make the result depending on what's cached or not. And that will not help the user to find images that are too large.

Patch is coming up.

Change 284887 merged by jenkins-bot:
Use Ajax request to fetch image size

https://gerrit.wikimedia.org/r/284887

Krinkle closed this task as Resolved.Jul 7 2016, 10:35 PM