Check for local file browsing with JavaScript

added by JefClaes
4/2/2012 9:33:18 AM

0 Kicks, 71 Views

Because I do most of my research while commuting by train, I often pull entire websites offline using httrack. While browsing the jQuery Mobile documentation locally this morning, I stumbled upon following gem. I was curious to see how they determine whether a page is browsed locally or not. Looking into the source, I was a bit dissapointed to find nothing but plain common sense.