Tag Archives: internet

For those who like hot-linking other people’s code

… life just got a bit safer. Browsers are starting to implement a (relatively easy) way to check integrity of the stuff you hot-link in your code – Chromium is adding this feature now. So that you and your visitors don’t get goatse’d by some mean person on the other end. All you have to do is add this integrity bit to the links you pull from other websites, and you can be sure to always serve – or gracefully fail to do so – the same content no matter what kind of hell breaks loose on that other server:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"
integrity="ni:///sha-256;C6CB9UYIS9UJeqinPHWTHVqh_E1uhG5Twh-Y5qFQmYg?ct=application/javascript">

Ok, so hot-linking jQuery is just lazy, I know, but there is way more third-party code out there than most people realize – stuff like Google Analytics, ads and other widgets are routinely pulled from third-party servers by websites all over the Interwebs, and this is a great first step to add some kind of checks to this mess.

Popular country domains from #alexa top 1mil sites

Quick grepping for some popular country domains, today’s top 1 million sites by popularity in Alexa, surprising results. Added .com for comparison.

527289    .com
37614    .ru
35083    .de
20162    .br
19565    .jp
18927    .uk
12807    .fr
12723    .in
12246    .it
9971    .cn
4774    .mx
4728    .ca
781     .su
508    .ng

Somewhere in there there’s probably some correlation with the list of countries by number of Internet users. Or not. Or maybe some countries like to use national TLDs more than others.

Apparently, today there are more popular websites in the USSR (!) than in Nigeria, despite the fact that USSR has been dead for 23 years and Nigeria apparently is #8 in the world by the number of Internet users.