WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
[resolved] Wont compress CSS (14 posts)

  1. pincode404
    Member
    Posted 3 years ago #

    I've just install the plugin again. Everything works like it should except the CSS and JS compression. Plugin don't want to compress them.
    I'm losing page speed score in google and I really want to solve this problem. Please let me know what i can do !!!

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    The plugin doesn't compress css and JS. You should try the wp-minify plugin.

  3. qdinar
    Member
    Posted 3 years ago #

    is it possible to turn on http server's gzipping so that it does not gzip what is already gzipped?

  4. cadbloke
    Member
    Posted 3 years ago #

    Gzip the files manually (7zip is good for that) and upload them to the server, then change .htaccess to look for them first.

    See my (somewhat messy) blog post at http://icanhazdot.net/2010/03/23/some-wordpress-stuff/ for a roundup of that kind of stuff.

    I also recommend wp-minify. It works very well (*on my machine)

  5. qdinar
    Member
    Posted 3 years ago #

    i have said here "is it possible to turn on http server's gzipping so that it does not gzip what is already gzipped? "
    i have found a topic about that:
    http://wordpress.org/support/topic/262102?replies=2 "should we still bother about mod_deflate?"

    but i think, may be mod deflate should be better configured to gzip only some files?

    it is still said in newest version's readme file in troubleshoopting section, 21, to disable mod_deflate.

  6. qdinar
    Member
    Posted 3 years ago #

    look http://wordpress.org/support/topic/192864?replies=3 .
    what is problem? should not mod_deflate automatically leave url that sends in header that content is gzipped? and mod_deflate does not automatically leave them but deflate all?

    let i show my mod_deflate server-wide configuration:

    <IfModule mod_deflate.c>
              # these are known to be safe with MSIE 6
              AddOutputFilterByType DEFLATE text/html text/plain text/xml
    
              # everything else may cause problems with MSIE 6
              AddOutputFilterByType DEFLATE text/css
              AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
              AddOutputFilterByType DEFLATE application/rss+xml
              AddOutputFilterByType DEFLATE text/javascript
    </IfModule>

    may be it is possible to delete only line with text/html for super-cache to work?

    unfortunately, as i know, it is impossible to turn off gzipping of text/html only or all only in one domain/vhost/site .>update: it seems to be impossible turn off what is turned on with AddOutputFilterByType which work with mime types, but there are AddOutputFilter and RemoveOutputFilter that work with file extension.< also it was said to me in httpd irc channel of freenode like that mod_deflate is quite old technology , and there is other technology, but i still do not use it, i tried once, but could not do or understand something. >update : indeed, it is deprecated, see http://httpd.apache.org/docs/2.2/mod/core.html#addoutputfilterbytype <

  7. qdinar
    Member
    Posted 3 years ago #

    i think mod_deflate works, there i have written about it again: http://wordpress.org/support/topic/plugin-wp-super-cache-again-about-mod_deflate?replies=5 .

    [donncha,] feature request: please also make automatically saving of gzipped css and js files and add rules for them in .htaccess .

    i have just now known, visiting link provided by cadbloke, that mod_gz for apache can do that (save gzipped version near original for serving), but i have not found it in my system (ubuntu)'s repository. maybe i install it later.

  8. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    qdinar - I'm seriously thinking of adding minify support, although I suspect it'll be a support headache. Must talk to the authors of wp-minify and w3-total-cache.

  9. qdinar
    Member
    Posted 3 years ago #

    i think minifying should be optional, i think just gzipping would make it quite little, and minifying would make css and js files hardly understandable when they are read, not all people want so [like] obfuscate these files, i think.

  10. qdinar
    Member
    Posted 3 years ago #

    also please improve browser-side caching in case several sites of multisite installation use same theme. they should use same css files and theme images ie with same address. main blog address of them is good, i think, because it is shorter. further improvement is to make url base of these files configurable, it is for admin can use special virtualhost with optimised parameters for that - without logging, with big expire value, should turn off php and deny php files, etc.

    these can work incorrectly if dynamic output is used as css and image files.

    i have(had?) written about this here: http://mu.wordpress.org/forums/topic/16404 "use blogs' themes' styles and images from blog service/main blog's domain".

    i have copied this to "ideas": http://wordpress.org/extend/ideas/topic/subsites-with-same-theme-should-use-static-css-and-image-files-with-same-uri?replies=1#post-17748 .

    and also javascripts. and including files of dashboards.

  11. cadbloke
    Member
    Posted 3 years ago #

    @Donncha - wp-minify works really well with super-cache. The only tricky performance tweak I suggest to exclude any page-specific css & JS and just cop the hit on those pages. If you keep the combined & minifed CSS at the highest common denominator then you're not continually downloading a new combined-minified file for each page simply because you need to add 1 or 2 files to it for that specific page. Wp-minify has settings to specifically include & exclude files

    Client-side caching helps a lot here too. I find it makes the biggest difference of all. There's nothing faster than a download that doesn't need to download, or even ping for a 304. Hy host is a cheap, shared host. Have a look at the Pingdom graph on my blog post to see the difference it made. Ignore the rest - you probably already know this.

  12. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    cadbloke - unfortunately if you enable client side caching that's too aggressive then new content won't be served. I've steered clear of doing anything but the most basic settings for the client simply because it will be a nightmare to configure.

    (Patches welcome, as always!)

  13. cadbloke
    Member
    Posted 3 years ago #

    donncha - I don't cache the html for more than about 30 minutes. It's the CSS, JS and image caching that buys you the speed. They're generally static and safe to leave lying around. I wrote a post about it at http://wordpress.stackexchange.com/questions/199/what-steps-can-i-take-to-optimize-wordpress-in-regard-to-server-load/340#340

    That whole thread may be of interest to you. Actually, that whole forum would be of interest to all of us.

  14. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    cadbloke - I agree about css, js and image caching. Thanks for the link.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic