javascript changes not taking effect.

T

tshad

Using asp.net 2.0, I am finding that at times, the old javascript will still
be there.

I was working with it for a couple of hours and the changes seem to happen.

But at the end of the day, I found that my last changes weren't taking
affect.

I was trying to delete my "alerts" before doing a final build but even after
taking out all my alerts, when I built it and ran it - the alerts were still
there.

If I took out the <style> tags that loaded the .js file, then there were no
alerts (as would be expected). The scripts would work as they weren't
there, but the alerts were not there. So obviously, it wasn't using an old
..js file.

But as soon as I added the <script> statements back in, the alerts were
there?

How do I get rid of them?

Thanks,

Tom
 
M

Michael Nemtsev [MVP]

Hello tshad,

what is THAT?!
I hardly can understand what are u talking about. There is no soothsayer
to solve your problem not seeing the line of your code

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


t> Using asp.net 2.0, I am finding that at times, the old javascript
t> will still be there.
t>
t> I was working with it for a couple of hours and the changes seem to
t> happen.
t>
t> But at the end of the day, I found that my last changes weren't
t> taking affect.
t>
t> I was trying to delete my "alerts" before doing a final build but
t> even after taking out all my alerts, when I built it and ran it - the
t> alerts were still there.
t>
t> If I took out the <style> tags that loaded the .js file, then there
t> were no alerts (as would be expected). The scripts would work as
t> they weren't there, but the alerts were not there. So obviously, it
t> wasn't using an old .js file.
t>
t> But as soon as I added the <script> statements back in, the alerts
t> were there?
t>
t> How do I get rid of them?
t>
t> Thanks,
t>
t> Tom
t>
 
T

tshad

Michael Nemtsev said:
Hello tshad,

what is THAT?!
I hardly can understand what are u talking about. There is no soothsayer
to solve your problem not seeing the line of your code

There really is nothing to show.

The problem was that the changes weren't taking affect.

I found out it had to do with caching. When I hit CTRL+F5, it refreshed the
page.

Apparently, even though I have my browser set to always get a new page - it
doesn't do the same for the included javascript files. Sometimes my changes
take effect (meaning the new javascript was loaded) and sometimes it doesn't
(meaning the cached version is getting loaded).

Is there someway to tell the system to not cache the javascript file while I
am building my app?

Thanks,

Tom
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

t> Using asp.net 2.0, I am finding that at times, the old javascript
t> will still be there.
t> t> I was working with it for a couple of hours and the changes seem to
t> happen.
t> t> But at the end of the day, I found that my last changes weren't
t> taking affect.
t> t> I was trying to delete my "alerts" before doing a final build but
t> even after taking out all my alerts, when I built it and ran it - the
t> alerts were still there.
t> t> If I took out the <style> tags that loaded the .js file, then there
t> were no alerts (as would be expected). The scripts would work as
t> they weren't there, but the alerts were not there. So obviously, it
t> wasn't using an old .js file.
t> t> But as soon as I added the <script> statements back in, the alerts
t> were there?
t> t> How do I get rid of them?
t> t> Thanks,
t> t> Tom
t>
 
P

Patrice

style ? You mean't script ?

I believe you included scripts multiple times i.e. :
- you are suppressing one script reference. Your scripts shoudn't run at
all. If they still run in a different flavor this could be because you still
have another reference to another script source in your application
- when you put them back it you then still have the bad version that comes
back and that supersedes earlier included script ?

I would say you included similar scripts two times...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top