Document Gallery
[resolved] ?document-gallery-css=1&ver=2.0.3:1 (5 posts)

  1. Piani
    Posted 1 year ago #

    Thanks for this great plugin and keep up the good work!

    I tested my page on http://gtmetrix.com/

    And I got this varning about "?document-gallery-css=1&ver=2.0.3:1"

    I dont know if someting needs to be changed or if this have someting to do with other plugins or wordpress itself but I wanted to report the issue.


    Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:


    Remove query strings from static resources
    Most proxies, most notably Squid up through version 3.0, do not cache resources with a "?" in their URL even if a Cache-control: public header is present in the response. To enable proxy caching for these resources, remove query strings from references to static resources, and instead encode the parameters into the file names themselves.


  2. Piani
    Posted 1 year ago #

  3. Dan Rossiter
    Plugin Author

    Posted 1 year ago #

    Hi wm,

    When possible Document Gallery does serve a static CSS file, but if you have custom CSS then we cannot serve it statically. Instead DG generate a dynamic CSS file containing both standard CSS and your custom content. If you have no custom CSS, the static CSS file is served, so the majority of users will have a cachable asset.

    Previously DG edited the CSS file directly to include custom CSS, but this is considered a bad practice in WP and introduces potential security risks.

    I've done some playing with caching options within the dynamic CSS, but all of my experimenting showed a longer time if I checked for an existing copy and return 304 when it's present. That said, if someone has recommendations for how this can be done efficiently, I'm happy to field recommendations.


  4. Piani
    Posted 1 year ago #

    Thanks for the information Dan. Keep up the good work!

  5. Dan Rossiter
    Plugin Author

    Posted 1 year ago #

    Hey wm,

    Just wanted to followup on this. Caching will still be problematic with custom CSS, but I've moved a lot of the processing that was happening each time the CSS was loaded off to instead be done whenever the change is made. You'll see these changes when you update to version 2.0.4.

    Testing on my system is showing about a 30% reduction in latency. That's all I've got up my sleeves for now, but if I find any more ways to improve this I'll implement them.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Document Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.