Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] Adding jpg file type to mode_expiry

  • Resolved Josefus Flavius


    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?


Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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.

    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, 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: W3 Total Cache] Adding jpg file type to mode_expiry’ is closed to new replies.