Old js code being used with ionic serve


#1

Has anyone else experienced the following problem?

Whilst running ionic serve I make slight chances to the code such as changing the message on a toast. When the page is refreshed it comes up with the message I had two or three changes before. I think what is happening is that the live reload is reverting back to the original code when it was first started.

I have to stop ionic serve and restart it to show the latest changes.


#2

This pops up from time to time, afaik it never was really “resolved” or even figured out what is causing it. Sorry.


#3

Thanks @Sujan12 at least I know it is not me!


#4

I’ve largely seen this as a result of the browser caching data, which can normally be disabled.


#5

@SigmundFroyd Not sure if you mean the following - but I develop with the check box Disable cache selected inside chrome.


#6

That is indeed what I meant.

You have the DevTools open while developing too, right? The disable cache option only works when they’re open.


#7

Not always (most of time I do as I always check to see how it looks on a iPhone).

Never knew that the disable cache only works when the tools are opened - then again never read any instructions manual.