CSS changes are not reflected even after changing version, hard refresh and clearing cache












1














I have an angular application with CSS in it.I have recently changed the CSS and deployed it on server but it is not getting reflected in the client machines.



I have done the following things:




  1. Clear cache and did a hard refresh (Ctrl+f5).

  2. Changed the version number of the CSS file and redeployed it.

  3. Opened developer tools and disabled Cache and reloaded.

  4. Pressed F12, go to source and checked the CSS file if new changes are getting loaded. New changes are there.


When I opened the web application in a new machine, the new changes are getting reflected.



When can be the possible reason for CSS not getting reflected even after checking all the above. Is there anything which I'm missing. Any help is highly appreciated.Thanks










share|improve this question






















  • When you deploy to your server, are you sure the old webapp files are deleted?
    – Carsten
    Nov 16 at 10:04










  • @Carsten, yes , I delete the old files before deploying
    – CrazyCoder
    Nov 16 at 10:05










  • "Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
    – Carsten
    Nov 16 at 10:07










  • @Carsten , yes, by version I mean I have added ?ver=1.2 at the end
    – CrazyCoder
    Nov 16 at 10:08










  • You added an angular tag to your question. Are you using ng-build --prod ?
    – Carsten
    Nov 16 at 10:11
















1














I have an angular application with CSS in it.I have recently changed the CSS and deployed it on server but it is not getting reflected in the client machines.



I have done the following things:




  1. Clear cache and did a hard refresh (Ctrl+f5).

  2. Changed the version number of the CSS file and redeployed it.

  3. Opened developer tools and disabled Cache and reloaded.

  4. Pressed F12, go to source and checked the CSS file if new changes are getting loaded. New changes are there.


When I opened the web application in a new machine, the new changes are getting reflected.



When can be the possible reason for CSS not getting reflected even after checking all the above. Is there anything which I'm missing. Any help is highly appreciated.Thanks










share|improve this question






















  • When you deploy to your server, are you sure the old webapp files are deleted?
    – Carsten
    Nov 16 at 10:04










  • @Carsten, yes , I delete the old files before deploying
    – CrazyCoder
    Nov 16 at 10:05










  • "Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
    – Carsten
    Nov 16 at 10:07










  • @Carsten , yes, by version I mean I have added ?ver=1.2 at the end
    – CrazyCoder
    Nov 16 at 10:08










  • You added an angular tag to your question. Are you using ng-build --prod ?
    – Carsten
    Nov 16 at 10:11














1












1








1







I have an angular application with CSS in it.I have recently changed the CSS and deployed it on server but it is not getting reflected in the client machines.



I have done the following things:




  1. Clear cache and did a hard refresh (Ctrl+f5).

  2. Changed the version number of the CSS file and redeployed it.

  3. Opened developer tools and disabled Cache and reloaded.

  4. Pressed F12, go to source and checked the CSS file if new changes are getting loaded. New changes are there.


When I opened the web application in a new machine, the new changes are getting reflected.



When can be the possible reason for CSS not getting reflected even after checking all the above. Is there anything which I'm missing. Any help is highly appreciated.Thanks










share|improve this question













I have an angular application with CSS in it.I have recently changed the CSS and deployed it on server but it is not getting reflected in the client machines.



I have done the following things:




  1. Clear cache and did a hard refresh (Ctrl+f5).

  2. Changed the version number of the CSS file and redeployed it.

  3. Opened developer tools and disabled Cache and reloaded.

  4. Pressed F12, go to source and checked the CSS file if new changes are getting loaded. New changes are there.


When I opened the web application in a new machine, the new changes are getting reflected.



When can be the possible reason for CSS not getting reflected even after checking all the above. Is there anything which I'm missing. Any help is highly appreciated.Thanks







css angular






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 at 10:01









CrazyCoder

410116




410116












  • When you deploy to your server, are you sure the old webapp files are deleted?
    – Carsten
    Nov 16 at 10:04










  • @Carsten, yes , I delete the old files before deploying
    – CrazyCoder
    Nov 16 at 10:05










  • "Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
    – Carsten
    Nov 16 at 10:07










  • @Carsten , yes, by version I mean I have added ?ver=1.2 at the end
    – CrazyCoder
    Nov 16 at 10:08










  • You added an angular tag to your question. Are you using ng-build --prod ?
    – Carsten
    Nov 16 at 10:11


















  • When you deploy to your server, are you sure the old webapp files are deleted?
    – Carsten
    Nov 16 at 10:04










  • @Carsten, yes , I delete the old files before deploying
    – CrazyCoder
    Nov 16 at 10:05










  • "Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
    – Carsten
    Nov 16 at 10:07










  • @Carsten , yes, by version I mean I have added ?ver=1.2 at the end
    – CrazyCoder
    Nov 16 at 10:08










  • You added an angular tag to your question. Are you using ng-build --prod ?
    – Carsten
    Nov 16 at 10:11
















When you deploy to your server, are you sure the old webapp files are deleted?
– Carsten
Nov 16 at 10:04




When you deploy to your server, are you sure the old webapp files are deleted?
– Carsten
Nov 16 at 10:04












@Carsten, yes , I delete the old files before deploying
– CrazyCoder
Nov 16 at 10:05




@Carsten, yes , I delete the old files before deploying
– CrazyCoder
Nov 16 at 10:05












"Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
– Carsten
Nov 16 at 10:07




"Changed the version number of the CSS file and redeployed it" -> are you pointing to the new version number?
– Carsten
Nov 16 at 10:07












@Carsten , yes, by version I mean I have added ?ver=1.2 at the end
– CrazyCoder
Nov 16 at 10:08




@Carsten , yes, by version I mean I have added ?ver=1.2 at the end
– CrazyCoder
Nov 16 at 10:08












You added an angular tag to your question. Are you using ng-build --prod ?
– Carsten
Nov 16 at 10:11




You added an angular tag to your question. Are you using ng-build --prod ?
– Carsten
Nov 16 at 10:11












3 Answers
3






active

oldest

votes


















0














is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.



Go to




  • Chrome developer tools (press F12)...

  • Click on Application tab on

  • the left navigation, click on "Service workers" and 'unregister"
    service workers...

  • going on the next option in the left navigation, click on "Clear storage"...

  • click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R


if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.






share|improve this answer





















  • @CrazyCoder, did you give this a shot?
    – Akber Iqbal
    Nov 19 at 15:23










  • yes, I forgot to accept it. it worked for me
    – CrazyCoder
    Nov 21 at 9:50



















0














Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved






share|improve this answer





















  • open css file from it and make it refresh -- how to make it refresh?
    – CrazyCoder
    Nov 16 at 10:06










  • right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
    – lucky
    Nov 16 at 10:07










  • I tried Ctrl+Shift+R, it didn't work
    – CrazyCoder
    Nov 16 at 10:07










  • yes but try it from right click and view page source
    – lucky
    Nov 16 at 10:09










  • I did, but not working :(
    – CrazyCoder
    Nov 16 at 10:13



















0














Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application






share|improve this answer





















  • I did this as well :(
    – CrazyCoder
    Nov 16 at 10:27











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53335459%2fcss-changes-are-not-reflected-even-after-changing-version-hard-refresh-and-clea%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.



Go to




  • Chrome developer tools (press F12)...

  • Click on Application tab on

  • the left navigation, click on "Service workers" and 'unregister"
    service workers...

  • going on the next option in the left navigation, click on "Clear storage"...

  • click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R


if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.






share|improve this answer





















  • @CrazyCoder, did you give this a shot?
    – Akber Iqbal
    Nov 19 at 15:23










  • yes, I forgot to accept it. it worked for me
    – CrazyCoder
    Nov 21 at 9:50
















0














is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.



Go to




  • Chrome developer tools (press F12)...

  • Click on Application tab on

  • the left navigation, click on "Service workers" and 'unregister"
    service workers...

  • going on the next option in the left navigation, click on "Clear storage"...

  • click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R


if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.






share|improve this answer





















  • @CrazyCoder, did you give this a shot?
    – Akber Iqbal
    Nov 19 at 15:23










  • yes, I forgot to accept it. it worked for me
    – CrazyCoder
    Nov 21 at 9:50














0












0








0






is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.



Go to




  • Chrome developer tools (press F12)...

  • Click on Application tab on

  • the left navigation, click on "Service workers" and 'unregister"
    service workers...

  • going on the next option in the left navigation, click on "Clear storage"...

  • click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R


if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.






share|improve this answer












is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.



Go to




  • Chrome developer tools (press F12)...

  • Click on Application tab on

  • the left navigation, click on "Service workers" and 'unregister"
    service workers...

  • going on the next option in the left navigation, click on "Clear storage"...

  • click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R


if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 16 at 10:16









Akber Iqbal

1,5932620




1,5932620












  • @CrazyCoder, did you give this a shot?
    – Akber Iqbal
    Nov 19 at 15:23










  • yes, I forgot to accept it. it worked for me
    – CrazyCoder
    Nov 21 at 9:50


















  • @CrazyCoder, did you give this a shot?
    – Akber Iqbal
    Nov 19 at 15:23










  • yes, I forgot to accept it. it worked for me
    – CrazyCoder
    Nov 21 at 9:50
















@CrazyCoder, did you give this a shot?
– Akber Iqbal
Nov 19 at 15:23




@CrazyCoder, did you give this a shot?
– Akber Iqbal
Nov 19 at 15:23












yes, I forgot to accept it. it worked for me
– CrazyCoder
Nov 21 at 9:50




yes, I forgot to accept it. it worked for me
– CrazyCoder
Nov 21 at 9:50













0














Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved






share|improve this answer





















  • open css file from it and make it refresh -- how to make it refresh?
    – CrazyCoder
    Nov 16 at 10:06










  • right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
    – lucky
    Nov 16 at 10:07










  • I tried Ctrl+Shift+R, it didn't work
    – CrazyCoder
    Nov 16 at 10:07










  • yes but try it from right click and view page source
    – lucky
    Nov 16 at 10:09










  • I did, but not working :(
    – CrazyCoder
    Nov 16 at 10:13
















0














Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved






share|improve this answer





















  • open css file from it and make it refresh -- how to make it refresh?
    – CrazyCoder
    Nov 16 at 10:06










  • right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
    – lucky
    Nov 16 at 10:07










  • I tried Ctrl+Shift+R, it didn't work
    – CrazyCoder
    Nov 16 at 10:07










  • yes but try it from right click and view page source
    – lucky
    Nov 16 at 10:09










  • I did, but not working :(
    – CrazyCoder
    Nov 16 at 10:13














0












0








0






Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved






share|improve this answer












Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 16 at 10:04









lucky

2710




2710












  • open css file from it and make it refresh -- how to make it refresh?
    – CrazyCoder
    Nov 16 at 10:06










  • right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
    – lucky
    Nov 16 at 10:07










  • I tried Ctrl+Shift+R, it didn't work
    – CrazyCoder
    Nov 16 at 10:07










  • yes but try it from right click and view page source
    – lucky
    Nov 16 at 10:09










  • I did, but not working :(
    – CrazyCoder
    Nov 16 at 10:13


















  • open css file from it and make it refresh -- how to make it refresh?
    – CrazyCoder
    Nov 16 at 10:06










  • right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
    – lucky
    Nov 16 at 10:07










  • I tried Ctrl+Shift+R, it didn't work
    – CrazyCoder
    Nov 16 at 10:07










  • yes but try it from right click and view page source
    – lucky
    Nov 16 at 10:09










  • I did, but not working :(
    – CrazyCoder
    Nov 16 at 10:13
















open css file from it and make it refresh -- how to make it refresh?
– CrazyCoder
Nov 16 at 10:06




open css file from it and make it refresh -- how to make it refresh?
– CrazyCoder
Nov 16 at 10:06












right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
– lucky
Nov 16 at 10:07




right click on page and go to view page source and from there open ur css file where u link it...and open it and refresh it
– lucky
Nov 16 at 10:07












I tried Ctrl+Shift+R, it didn't work
– CrazyCoder
Nov 16 at 10:07




I tried Ctrl+Shift+R, it didn't work
– CrazyCoder
Nov 16 at 10:07












yes but try it from right click and view page source
– lucky
Nov 16 at 10:09




yes but try it from right click and view page source
– lucky
Nov 16 at 10:09












I did, but not working :(
– CrazyCoder
Nov 16 at 10:13




I did, but not working :(
– CrazyCoder
Nov 16 at 10:13











0














Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application






share|improve this answer





















  • I did this as well :(
    – CrazyCoder
    Nov 16 at 10:27
















0














Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application






share|improve this answer





















  • I did this as well :(
    – CrazyCoder
    Nov 16 at 10:27














0












0








0






Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application






share|improve this answer












Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 16 at 10:16









Balaji V

505




505












  • I did this as well :(
    – CrazyCoder
    Nov 16 at 10:27


















  • I did this as well :(
    – CrazyCoder
    Nov 16 at 10:27
















I did this as well :(
– CrazyCoder
Nov 16 at 10:27




I did this as well :(
– CrazyCoder
Nov 16 at 10:27


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53335459%2fcss-changes-are-not-reflected-even-after-changing-version-hard-refresh-and-clea%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?