by codedokode · 11y ago · 0 comments
CDNs are used to optimize traffic cost but hosting just single JS library there won't save you much.
Calculating hashes is bothersome and requires modification of an app so probably nobody is going to use it.
I never use libraries hosted at free CDNs.
EDIT: I cannot think of a scenario where this feature can be useful.
EDIT 2: And you cannot use this feature for scripts like Google Analytics because they can be modified anytime.
Using this it looks like you could put the hash in your markup and if their JavaScript code changed it wouldn't execute. For some people having that deadman's switch might be better than an always-execute policy on JS that you aren't writing yourself.