Urgent.News

What's breaking now, across thousands of outlets.

Tech

Our free QR tool ships 363 KB, and the PDF button pulls another 137 KB only if you press it

Open pub-trivia.app/tools/qr-code-generator , then paste this into the console: const js = () => performance . getEntriesByType ( " resource " ). filter ( r => / \. js (\? |$ ) / . test ( r . name )); const total = () => ({ files : js (). length , bytes : js (). reduce (( a , r ) => a + r . encodedBodySize , 0 ) }); total () On a cold load I get { files: 18, bytes: 362945 } . Now type an address,…

On the free QR code generator tool provided by pub-trivia.app, the tool's JavaScript bundle size is 363 KB. When the PDF button is clicked, the bundle size increases by 137 KB, totaling 500 KB. The tool is lightweight with no backend, consisting of four tools on four pages: a QR code generator, a scoresheet generator, a round planner, and a team name generator.

The scoresheet generator and team name generator rely on two large dependencies, qrcode and jspdf, respectively. These dependencies are only imported when needed, preventing unnecessary loading of large libraries. The QR code generation process involves downloading a code based on the input URL. The scoresheet generation process creates an A4-size PDF with four QR codes.

Overall, the tool's functionality is achieved without uploading or sending any data to a server, as the data is generated and displayed in the user's browser.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

ERC20 Edge Cases Every Smart Contract Engineer Should Know

Your protocol launches. Everything passes the test suite with 100% coverage. Your audits are clean. Then, an unexpected token enters your liquidity pool.

  • Fee-on-transfer and rebasing tokens can lead to systemic insolvency due to balance discrepancies.
  • Always use OpenZeppelin s SafeERC20 library to normalize token behavior and prevent silent failures.

More from Wednesday 7 October →