Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS files which are on CDN are not processed #41

Open
Creativico opened this issue Sep 18, 2022 · 1 comment
Open

CSS files which are on CDN are not processed #41

Creativico opened this issue Sep 18, 2022 · 1 comment
Assignees
Labels
reproducing Issue is not known yet and has to be reproduced to fix

Comments

@Creativico
Copy link

Creativico commented Sep 18, 2022

Describe the bug
I was testing on same site url and same page of the site.
When the CSS files were ON the CDN generated critical had 8kB, while the CSS files were OFF the CDN the generated critical had 52kB.
Also the Crittr run time while files are ON the CDN: 8.8s, Crittr run time while the files are OFF the CDN: 15.7s - runned via terminal, all the same parameters.

The site screenshot from crittr in both cases is completely normal, which means the CSS files ARE loading correctly.
The generated critical 8kB CSS breaks the site until other CSS is lazy loaded

To Reproduce

  1. Put ALL CSS files on the CDN
  2. Generate critical via terminal
    node /var/www/critical/crittr.js --url="https://whatever.com"
  3. Produced CSS file is far less than when CSS files are OFF the CDN.

Expected behavior
It should be more or less identical +/- 10% size due that CDN changes relative paths to absolute.

Screenshots
https://jmp.sh/cWGJaHp
https://jmp.sh/rhgEri7

@philipp-winterle philipp-winterle self-assigned this Sep 19, 2022
@philipp-winterle philipp-winterle added the reproducing Issue is not known yet and has to be reproduced to fix label Sep 19, 2022
@philipp-winterle
Copy link
Owner

I had time to check your problem and it seems that the cdn is not reachable by crittr at the time it has to be reached.
Crittr does not remove or download images from css files processed. It just opens a headless browser and checks the page. If the css is not as big as it should be it seems you do not open the url you want to open.

I would suggest to run crittr with the puppeteer - headless: true option to get an impression of what the website is looking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproducing Issue is not known yet and has to be reproduced to fix
Projects
None yet
Development

No branches or pull requests

2 participants