Why does subresource integrity need the crossorigin attribute?

Subresource Integrity is a new security feature that safeguards websites against tampering of a script/stylesheet at the source. Say, you want to include a script from a public CDN, but you also protect yourself against potential manipulation of the code after you have included it, SRI is the way to go. The feature gives the developer the ability to add a hash-sum with the script tag. Before the browser loads the resource, it will match the hash-sum of the content with what is specified in the tag. If they are equivalent browser proceeds with execution, otherwise it’s blocked.



Building a Whistle Detector Using WebAudio API

There are lots of things to get excited about HTML5 and the one which caught my curiosity was HTML5 Audio / Video API. I was overwhelmed with ideas of practical applications like face detect login or inline dictation but I chose to start with something small - a whistle detector. Although, not wholly accurate it works quite well with very a good accuracy. I used M. Nilsson’s research paper, “Human Whistle Detection and Frequency Estimation” to implement this. It took me a while to get understand exactly what the paper narrates with its mathematical notations but luckily my wandered at the right place to get the right idea.