WICG / transfer-size

38 stars 8 forks source link

Header vs attribute configuration #14

Open nbeloglazov opened 6 years ago

nbeloglazov commented 6 years ago

How both configuration interact? For example in the following use case: ad network js creates an iframe and sets transfersize to 300. At the same time website owner returns configuration in header which sets transfersize to 100. Which one wins? The one with stricter limits? Assuming that both ad js and website js register listeners, will they be able to determine which limits were exceeded?

jkarlin commented 6 years ago

Good question. I'm partial to the stricter limit winning, and need to add that to the details section of the explainer.

Yes, the size that was exceeded will be in the event:

Once a threshold is crossed, the bubbling transferexceeded event (a new event type which includes the exceeded threshold and resource category ) is fired on the frame element in the parent frame.