Support » Plugin: Document Gallery » ?document-gallery-css=1&ver=2.0.3:1

  • Resolved Piani

    (@webbmasterpianise)


    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.

    Report:

    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:

    http://myurl.com/?document-gallery-css=1&ver=2.0.3:1

    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.

    https://wordpress.org/plugins/document-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Piani

    (@webbmasterpianise)

    Plugin Author Dan Rossiter

    (@danrossiter)

    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.

    -Dan

    Piani

    (@webbmasterpianise)

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

    Plugin Author Dan Rossiter

    (@danrossiter)

    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.

    -Dan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘?document-gallery-css=1&ver=2.0.3:1’ is closed to new replies.