WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Adding jpg file type to mode_expiry (3 posts)

  1. Josefus Flavius
    Member
    Posted 2 years ago #

    Under mode_expires, W3 Total Cache includes the jpeg image file type, but not the jpg file type - the following line is included in .htaccess:

    ExpiresByType image/jpeg A31536000

    and many other file types, but not jpg. When trying to manually add a line of code into the appropriate W3 Total Cache section of .htaccess, the plugin stops functioning.

    For those of us with many old posts with jpg files (which now load noticeably more slowly than the rest)... are there any suggestions on how to add jpg to the list?

    Thanks!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. kbenjamin
    Member
    Posted 2 years ago #

    The expires headers refer to a MIME type, not to file extensions.

    The official IANA list of MIME types only defines image/jpeg, not image/jpg.

    http://www.iana.org/assignments/media-types/image/index.html

    As for files being noticeably slower, have you tested this with a measuring tool after clearing your browser cache each time or is it a subjective impression?

    What's the performance difference if you have the identical image (preferably large) saved with both .jpg and .jpeg extensions?

    My bet is none.

  3. Josefus Flavius
    Member
    Posted 2 years ago #

    Thanks for your reply.

    The overall performance of the website has improved tremendously since installing, tweaking, and re-tweaking W3 Total Cache, with post pages now usually loading within about 2 seconds (as measured and recorded by pingdom.com), when not logged in, compared to 5-8 seconds when logged in. [WP 3.2.1; Thesis 1.82; hosted on a shared server at a major hosting company.

    What drew attention to the old post pages with .jpg images is that now those images load noticeably slower than their respective pages. Before W3, the page and image appeared more or less at once. Now, on old pages with old jpg images, the image loading trails behind the page. New pages with jpeg files (with mode_expiry set by W3), the image doesn't trail behind.

    All that is via a browser where the reader is not logged in to the website and there's no browser caching effect from prior visit affecting the pages differently for the two situations.

    The question remains: is there a way to have W3 Total Cache also apply the defined mode_expiry rules to jpg files?

    Thank you again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic