Closed kaelig closed 9 years ago
Why is there even parsing? Issue a HEAD, request OK, sounds good; fallback to GET if HEAD is blocked. I tried pasting in a link and it's failing. Not a good first impression :(
edit: There might be an issue with the CSS file I put in, there might be a parsing error--but I can't tell since there's no error message or feedback about what's going wrong. Another one worked fine.
I used the Regex found in Stylestats in a project of mine (to detect if a JavaScript file was passed as a URL), but it did not accept my url
https://cdn.polyfill.io/v1/polyfill.min.js?ua=firefox/30
.The regex can be found in stylestats.js: https://github.com/t32k/stylestats/blob/master/lib/stylestats.js#L29
I can recommend the use of the valid-url package which worked well for me.