magentocachingmagento2magento-2.0

Cannot see changes in Magento 2 js and css


I am new to magento 2 and I am creating extension for it.

But I am unable to see any js and css changes.

When i check on my source code my js file custom.js and css file custom.css is loaded properly but i am unable to see any of my changes.

I tried to clear cache and didn't get any result.

I cleared cache from backed and manually as well and disabled all cache too.


Solution

  • step 1. delete all folders under pub/static/frontend

    step 2. delete cache folder under var/cache

    Now open your command prompt and go to your root installation of magento 2 and fire the following commands

    step 3. php bin/magento setup:static-content:deploy

    step 4. php bin/magento indexer:reindex

    The above step worked for me. I hope it will work for you also.

    Let me know if you still facing any problem.