I have a page that loads a third party stylesheet and alert()'s some info from it. For some reason it only works if I open it locally; hosting the page anywhere breaks it.
Here's the code:
<html>
<head>
<link rel="stylesheet" href="https://SNIP" type="text/css">
</head>
<body>
<script>
alert(document.body.currentStyle.fontFamily);
</script>
</body>
</html>
I've looked at the HTTP requests in burp and they appear to be identical, except that the local one is missing the Referer header since it's cross-protocol.
I've tried changing the doctype & turning quirks mode on and off to to avail. Any ideas?
-------------------------------------------------------
Research blog