added protocol check before doing a XMLHttpRequest for last-updated (HTTP only)
name_range cleanup, inspired by Fantastika 2013 code