An exploration of quirky browser APIs, focusing on the History.pushState() method's 'unused' parameter. The parameter was originally named 'title' in the 2008 HTML5 spec, intended to set a title for browser history entries. Browsers universally ignored it, making it pointless — but by then, too many SPAs had already adopted the three-parameter signature. Removing or making it optional would break existing sites, so the spec renamed it to 'unused' instead. This serves as a case study in the web's extreme commitment to backward compatibility: once an API ships and gets adopted, it's nearly impossible to fix design mistakes.

5m read timeFrom alexwlchan.net
Post cover image
1.5K Impressions