Whenever I edit
app/design/frontend/Dzinehub/Theme/web/css/styles-l.css , it does'nt get reflected in the front end when i load the site .After every change , I ve to clear the cache and run static content-deploy for the changes to appear.Is there any other way ?
You could run:
setup:static-content:deploy OR delete the file(s) manually
While developing the first approach could be extremely slow so personally I prefer to remove the created files.
You can find a detailed explanation about code clean here
BTW: It is preferable edit .less instead .css files to maintain scalable and 'neat' your theme code.
If you set Magento to be in developer mode,"Static view files are not cached; they are written to the Magento pub/static directory every time they’re called" as it describes here: http://devdocs.magento.com/guides/v2.0/config-guide/bootstrap/magento-modes.html
You can set developer mode with cli:
bin/magento deploy:mode:set developer.
Also make sure you've disabled the Magento cache through the admin, and review the link I proved above which talks about the other modes available in Magento 2.
Clear / Flush Magento cache by typing “php bin/magento cache:flush”.
In this step, we are setting up static content to deploy on our Magento store. To perform this, type “php bin/magento setup:static-content:deploy”.
And finally, to Reindex Magento Static Blocks type “php bin/magento indexer:reindex”.
I hope this may work for you. :)
I just found the answer myself , You need to enable the apache server rewrite. Just follow these steps if you are a linux user ,Goto terminal and type
sudo a2enmod rewrite
You need to restart the web server now to apply the changes:
sudo service apache2 restart
Clear static files in cache management then run deploy.