Skip to content

Download page: show gzipped size#6067

Open
patmmccann wants to merge 7 commits into
prebid:masterfrom
patmmccann:codex/add-gzip-package-size-to-download-page
Open

Download page: show gzipped size#6067
patmmccann wants to merge 7 commits into
prebid:masterfrom
patmmccann:codex/add-gzip-package-size-to-download-page

Conversation

@patmmccann
Copy link
Copy Markdown
Collaborator

fixes #5402 but scoped down a bit to total package size. User will be able to see the effct of removing a package on total though, and this should solve for imports and the like by just showing the effect on the total.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2025

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit 67cf866
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6849f8f7a7adac0008c0ee48
😎 Deploy Preview https://deploy-preview-6067--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@muuki88
Copy link
Copy Markdown
Contributor

muuki88 commented Jun 3, 2025

@patmmccann can codex also resolve merge conflicts?

@patmmccann
Copy link
Copy Markdown
Collaborator Author

Yeah

Comment thread assets/js/download.js
Comment on lines +85 to +93
function triggerDownload(blob, filename) {
var link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function triggerDownload(blob, filename) {
var link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}

This function already exists and just got copy and pasted to the top

Comment thread assets/js/download.js
Comment on lines +122 to +130
if (window.pako) {
try {
var gz = pako.gzip(data);
var kb = (gz.length / 1024).toFixed(1);
document.getElementById('package-size').innerText = 'Estimated gzipped size: ' + kb + ' kB';
} catch(e) {
console.log('pako gzip failed', e);
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this after the download has a weird UX. I understand that in order to calculate the gzipped size, we first need to have the file itself. Still it's so tiny at the bottom, I could hardly find it.

We can add this, but not sure of the value it adds 😁

@jdwieland8282
Copy link
Copy Markdown
Member

In addition to gzipped size, could we also expose the fingerprinting score per adapter to the docs site in a table? or in professor prebid?
CC: @ChrisHuie

@ChrisHuie ChrisHuie self-requested a review December 4, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: put gzip package size on download page

3 participants