P
P
private132020-03-07 20:14:44
htaccess
private13, 2020-03-07 20:14:44

How to disable caching of svg files on the site?

I ask for help in prohibiting caching of svg files on the site using htaccess.
The code below doesn't work. I think this line should be written correctly -- ExpiresByType image/svg+xml "access plus 0 month" -- , but I can't figure out what it should look like.

<IfModule mod_expires.c>
  ExpiresActive on
  #ExpiresDefault "access plus 1 hours"
  #ExpiresDefault "access plus 10 years"
  ExpiresDefault                          "access plus 1 month"
  ExpiresByType image/svg+xml             "access plus 0 month"

<IfModule mod_headers.c>
  Header append Cache-Control "public"
</IfModule>
</IfModule>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
privat13, 2020-03-07
@privat13

So far, I'm using the solution in the form of adding the following code to the link....
<?php echo date('YmdHis');?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question