2

I'm new to Drupal and PHP. I have a project where I have updated the css and saved in in my custom theme.

My problem is that it is not updating when I refresh the page.

Is there something I have to do to make that take???

I know I have the right file and the right selector...

Thanks for any help!!

0

2 Answers 2

5

You need to go to:

Drupal > Performance > Clear cache 

Or if you have installed drush, then you can run below command to clear the cache:

drush cc

Note: Adding my comment as answer, so that OP can mark the question as done/answered.

Sign up to request clarification or add additional context in comments.

1 Comment

You can also do drush cr
4

If you are working in a development or staging enviornment:

  1. Go to Configuration -> Performance. Set page cache to no-caching.
  2. Click 'Clear Caching', or via command line use drush cr. This will add a new 'cache-buster' query string to your css, such as main.css?dfweaf where dfweaf changes after a cache rebuild.
  3. Look into setting up a settings.local.php and development.services.yml to disable various layers of caching while working.
  4. While working in your browser, open developer tools and on the Network tab check 'Disable cache'. When refreshing the page, right click on the refresh icon and choose 'Empty Cache and Hard Reload' to flush your browser cache files. This works in Chrome.
  5. If changing Javascript files, update the VERSION number in your libraries.yml file

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.