Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

How I Check a Download Is a Real MP4, Not an HTML Error Page Wearing a .mp4 Name

A download link can lie. I learned that the hard way while building ramrom.io, my little video downloader. A provider would return a 200 status, a filename ending in .mp4, and a body that was actually…

  • Verify Content-Type header as a hint, not sole confirmation
  • Scan initial bytes for "ftyp" to confirm MP4 format
  • Check file size against Content-Length header for sanity

Your SQL Pagination Can Repeat Rows. A Cursor Fixes Only Part of It.

Page one looks right. You click Load more , and the last item appears again. Someone deletes a record, and now an item disappears between pages instead.

  • OFFSET and LIMIT pagination can cause row repetition or skipping
  • Cursor-based pagination fixes part of the issue
  • Keyset pagination ensures correct rows based on current database state

More from Thursday 5 November →