My css file does not change formatting

Asked

Viewed 653 times

0

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

Editor that use: Is the Notepad+

1 answer

0


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

If it’s on the PHP page

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

href="css.css?key=<?php echo $key ?>"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.