# Old js code being used with ionic serve

**URL:** <https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829>\
**Category:** ionic-v3\
**Created:** [November 29, 2017, 4:21pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829 "2017-11-29T16:21:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAR19](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jar19/32/113216_2.png) [@JAR19](https://forum.ionicframework.com/u/JAR19)\
**Post date:** [November 29, 2017, 4:21pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/1 "2017-11-29T16:21:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 29, 2017, 5:14pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/2 "2017-11-29T17:14:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JAR19](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jar19/32/113216_2.png) [@JAR19](https://forum.ionicframework.com/u/JAR19)\
**Post date:** [November 29, 2017, 5:19pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/3 "2017-11-29T17:19:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SigmundFroyd](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sigmundfroyd/32/111604_2.png) [@SigmundFroyd](https://forum.ionicframework.com/u/SigmundFroyd)\
**Post date:** [November 29, 2017, 5:19pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/4 "2017-11-29T17:19:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JAR19](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jar19/32/113216_2.png) [@JAR19](https://forum.ionicframework.com/u/JAR19)\
**Post date:** [November 29, 2017, 5:26pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/5 "2017-11-29T17:26:15Z")

</div>

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

![ionic](https://global.discourse-cdn.com/ionicframework/original/3X/5/5/55a097d6036c0cea7a71131e4d368346e9ee415d.jpg)

---

<div class="post-metadata">

**Author:** ![SigmundFroyd](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sigmundfroyd/32/111604_2.png) [@SigmundFroyd](https://forum.ionicframework.com/u/SigmundFroyd)\
**Post date:** [November 29, 2017, 5:28pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/6 "2017-11-29T17:28:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JAR19](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jar19/32/113216_2.png) [@JAR19](https://forum.ionicframework.com/u/JAR19)\
**Post date:** [November 29, 2017, 5:37pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/7 "2017-11-29T17:37:32Z")

</div>

> [@SigmundFroyd](#):
>
> You have the DevTools open while developing too

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.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 10:01pm UTC](https://forum.ionicframework.com/t/old-js-code-being-used-with-ionic-serve/113829/8 "2021-07-19T22:01:20Z")

</div>

Closed on July 19, 2021, 10:01pm UTC


