question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with File combiner CSS

See original GitHub issue

The 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:closed
  • Created 10 years ago
  • Reactions:1
  • Comments:24 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
MartinKolarikcommented, Sep 3, 2018

@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.

0reactions
batata004commented, Sep 4, 2018

@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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error with Combine CSS files - WordPress.org
Hi SiteGround – I have found a problem with the Combine CSS frontend ... The .css file includes the genericon files following Genericons...
Read more >
Why You SHOULDN'T Combine CSS & JS (performance ...
Yes, it's true! Merging your CSS/JS often reduces code, stripping out empty spaces and unnecessary code. So it would seem like your site...
Read more >
Resolving Issues with Minify CSS & Combine CSS - WP Rocket
To resolve display issues that may occur when CSS Minify /Combine is active, please take the following steps: Install the Blue Button Chrome...
Read more >
Merging CSS files - java - Stack Overflow
I have to merge CSS files to one big CSS file to reduce connections made during page load. Basically if I just append...
Read more >
Should I combine CSS/JS Files on my Website? - GTmetrix
While modern browsers are quite smart in how they handle them, they still pose an issue, particularly if you have multiple CSS/JS files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found