Problem with File combiner CSS
See original GitHub issueThe file combiner seems to be having some issues, after several tests i can confirm there is really some issue.
I’m trying to load this:
http://cdn.jsdelivr.net/g/fontawesome,normalize
When you load this:
<link rel="stylesheet" href="//cdn.jsdelivr.net/g/fontawesome,normalize">
This sometimes returns the type as text/css
which is the expected response, but most of the time it returns application/javascript
which is wrong obviously and sometimes it doesn’t even return any type at all. Although the response content is present, but browser doesn’t seem to understand the type of file if the content type header isn’t present.
Another problem with this is that, the additional files it has (For example the fonts file), it loads a wrong URL. In my case when i tried loading font-awesome, it loads the following URLs and throws 404 not found error.
http://cdn.jsdelivr.net/fonts/fontawesome-webfont.woff?v=4.0.3
http://cdn.jsdelivr.net/fonts/fontawesome-webfont.ttf?v=4.0.3
http://cdn.jsdelivr.net/fonts/fontawesome-webfont.svg?v=4.0.3
Here are the response headers:
Access-Control-Allow-Origin:*
Cache-Control:public, max-age=16070400
CF-Cache-Status:HIT
CF-RAY: Randomstring
Connection:keep-alive
Content-Encoding:gzip
Content-Type:application/javascript
Date:Thu, 13 Mar 2014 19:39:53 GMT
Expires:Mon, 15 Sep 2014 19:39:53 GMT
Server:cloudflare-nginx
Transfer-Encoding:chunked
Vary:Accept-Encoding
Let me know what’s the problem. Also, I just need the main file latest version, So i don’t think i need to specify version or brackets, etc.
Issue Analytics
- State:
- Created 10 years ago
- Reactions:1
- Comments:24 (20 by maintainers)
Top GitHub Comments
@batata004 after evaluating the possible solutions again, we think rewriting paths in CSS files could work. We’ll most likely do that in the future (follow https://twitter.com/jsDelivr if you want to be notified). We won’t be attempting to handle this for JS files where it would be way more complicated and less reliable.
@MartinKolarik Great news, I will follow your twitter! 😃 Indeed, for JS it would be much more complicated and also it wouldnt be so critical cause the chance of a JS library requesting an external file is waaay lower than a CSS file requesting an external file (which most of the time requests fonts, images, other css files and so on).
Anyway, this will be a great addition to jsdelivr! You see, the main reason I like using COMBINE is that the bigger the concatenated file is, the best the GZIP compression works! Using COMBINE does not save only the “handshake” of each request that has to be made to every single file, using COMBINE saves A LOT when you concatenate a file and GZIP it, the resulting GZIP can easily save 80%! When GZIPING small files, it usuaally saves around 30%! So using COMBINE is a win-win feature in many aspects!