Image Expires Tag - how can I alter this? [Basic user with no understanding query]

7 views
Skip to first unread message

Richard Jackson

unread,
Apr 18, 2016, 12:02:49 PM4/18/16
to Mezzanine Users
Hi there,

I recently ran an SEO check on my site which is telling me (amongst other things) that I'm not using expires headers for my images. The explanation advises that to resolve this I some lines to the .htaccess file, specifically:
<IfModule mod_expires.c>
    ExpiresActive on
 
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
</IfModule>
What should I be doing to make use of these tags? I haven't come across the .htaccess file in Django/Mezzanine so am not sure of how I can make such an alteration.
Any advice/feedback/best practice suggestions would be greatly appreciated as this isn't an area I'm in any way familiar with.
Thanks!
Rich

Ken Bolton

unread,
Apr 18, 2016, 1:18:39 PM4/18/16
to mezzanine-users
Hi Richard,

If you are using the Fabric script to deploy your site behind an nginx
web server, the default configuration includes thirty-day expires
headers at https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/deploy/nginx.conf.template#L41.

-ken
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages