• Resolved ms100

    (@ms100)


    Hi support,

    Maybe svg can be added to the WP-Optimize Browser Cache?
    (I don’t see svg in the .htacces file when this function is enabled)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wpmansour

    (@wpmansour)

    To add SVG file support to the browser cache functionality in WP-Optimize, you can extend the .htaccess file by adding a directive that includes SVGs under cache control. This would enable browser caching for SVG files similarly to other static assets.

    To do this manually, you can add the following line to the .htaccess configuration for browser caching:

    <IfModule mod_expires.c>
    ExpiresByType image/svg+xml "access plus 1 month"
    </IfModule>

    This code ensures that SVG files are cached by the browser for one month. You can modify the duration as needed.

    Since this isn’t currently an automated feature in WP-Optimize based on your inquiry, you could consider adding this line manually or suggesting it as an enhancement for future updates to the plugin.

    Thread Starter ms100

    (@ms100)

    Hello @wpmansour

    Thanks for the reply, I have added the line you suggested.
    Would you also suggest to do this?

    <IfModule mod_headers.c>
    <filesMatch "\.(ico|jpe?g|png|gif|webp|swf|svg+xml)$">
    Header set Cache-Control "public"
    </filesMatch>

    Default is:

    <IfModule mod_headers.c>
    <filesMatch "\.(ico|jpe?g|png|gif|webp|swf)$">
    Header set Cache-Control "public"
    </filesMatch>

    Thanks again.

    Plugin Support wpmansour

    (@wpmansour)

    I’m glad to hear that, Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.