• Resolved twthindia

    (@twthindia)


    The Header media is not cached, so it takes around 7,382 KiB of transfer size, how to make it cacheable??

    • This topic was modified 4 years, 2 months ago by twthindia.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @twthindia, I hope you are doing great.

    This should help you out. This code will specify caching rules for any .mp4 files. It should be copied at the bottom of your .htaccess file.

    
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType video/mp4 "access plus 1 year"
    </IfModule>
    <ifModule mod_headers.c> 
        <filesMatch ".(mp4)$">
            Header set Cache-Control "max-age=31536000, public"
        </filesMatch>
    </ifModule>
    

    Make sure to create a backup of your .htaccess file just to be safe, and if you are unable to see it, consult your hosting provider or developer on how you can edit this file.

    I hope this helps, have a nice day,
    Andrija

    Thread Starter twthindia

    (@twthindia)

    Thanks, but I am in a nginx server.
    There is no .htaccess file

    • This reply was modified 4 years, 2 months ago by twthindia.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to make header media cacheable?’ is closed to new replies.