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

Duplicate data-uris bloat the CSS #30

Open
rodneyrehm opened this issue Oct 25, 2010 · 3 comments
Open

Duplicate data-uris bloat the CSS #30

rodneyrehm opened this issue Oct 25, 2010 · 3 comments

Comments

@rodneyrehm
Copy link

If the CSS contains multiple references to the same image, CSS-JS-Booster currently embeds the image for each occurance. This can easily lead to a pretty large CSS file (or many chunks of it).

MHTML does not fall for this. but with data-uris I don't see a viable solution to reducing the overhead. The only way out is to skip images with multiple references. If the WebDev still wishes to make use of data-uris, he must modify his CSS accordingly.

@Schepp
Copy link
Owner

Schepp commented Oct 25, 2010

When I have the time, I will do some experiments and tests trying to shift all images to a second lazy-loaded file. But its complicated and also bears the risk to break the CSS-cascade if done wrong. So I can't promise anything and I also don't know when this will be ready (or dismissed).

@vvo
Copy link
Contributor

vvo commented Jan 4, 2011

You should have a "background definition" css file when developing.

It's easier to maintain especially when using css sprites.

@Schepp
Copy link
Owner

Schepp commented Feb 22, 2011

True. Did you know that you can already do the lazyloading-thing in Booster?
https://github.com/Schepp/CSS-JS-Booster/wiki/Advanced-Usage

$booster->css_lazyload = TRUE;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants