Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

100% agree. Have been wondering this for a while.

One way to do it would be to include an extra attribute on the script tag with a SHA1 hash of the library. For example:

    <script type="text/javascript" signature="24bdd1c96c20c3943054c146340243ccf88eef9e" src="http://myserver.com/js/jquery-1.7.js" ></script>
Old browsers would ignore the extra 'signature' attribute, while new browsers could check for that library in their included, pre-optimized list and skip the download if its found.

Seems like it would solve a lot of problems at once without affecting backwards compatibility.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: