My css file does not change formatting

0

Some days ago I had this problem. I put the css file in the document home.php <link href="css.css" rel="stylesheet"> the formatting goes, but later when I will include other formatting in the css.css file no change appears at all. Note: You must create another css file for the formatting to go all right , what can it be?

Editor I use: It's notepad +

    
asked by anonymous 20.02.2017 / 22:23

1 answer

0

To avoid caching, you need to pass a random variable in the URL. So the browser will not find the file in the cache and will request it from the server.

If it is in PHP page

$key = uniqid(md5(rand()));

href="css.css?key=<?php echo $key ?>"
    
21.02.2017 / 00:58