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

Serve the CSS in a way that doesn't damage performance #32

Open
Photosynthesis opened this issue Jul 7, 2020 · 0 comments
Open

Serve the CSS in a way that doesn't damage performance #32

Photosynthesis opened this issue Jul 7, 2020 · 0 comments

Comments

@Photosynthesis
Copy link

This plugin is great, but unusable on sites where performance is a concern until the CSS is delivered in a way that doesn't bypass caching. In its current form it bypasses the cache (because of the query string in the stylesheet URL), and the whole Wordpress environment has to be loaded in order to return the CSS (because it's being output by plugin PHP code). This combination makes it very problematic for performance.

This could be fixed by writing the CSS out to an actual file. A possibly simpler solution would be to use a WP API endpoint to serve the CSS from a cachable URL without a query string. This would still require PHP and Wordpress to generate the CSS the first time, but at least it could be cached.

Thanks for building a nice simple plugin!

@Photosynthesis Photosynthesis changed the title Serve the CSS in a way that doesn't bypass the WP cache Serve the CSS in a way that doesn't bypass caches Jul 7, 2020
@Photosynthesis Photosynthesis changed the title Serve the CSS in a way that doesn't bypass caches Serve the CSS in a way that doesn't damage performance Jul 7, 2020
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

1 participant