• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resources - Javascript file strange behavior!!!

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hellow guys, I'm having a problem regarding with my javascript files in my spring web project.

I wonder what's wrong with this, but my external javascript file doesn't reflect the changes I made to it when I run the program.
What I do is I need to rename the file so that the changes would take effect.

When I close eclipse and open it again, then the changes would not be reflect again. Then I need to rename the javascript file again.

It seemed that it retains the previous code it has everytime I close and open my eclipse.

I'm lost guys, have you experienced this problem?

Any help would be appreciated!

Thanks in advance!


heres the part of my dispatcher servlet


and here's my html file code :
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I may be misunderstanding but it sounds like to me that your browser is caching your javascript. Changing the name is forcing the browser to reload it.
 
Cj Recto
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thanks for that answer, I think that's the problem, I'm currently working on it! Thanks!
 
Cj Recto
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thinks I found the solution, let me post it here just incase anyone would experience the same problem.

in your mvc resources configuration, set cache-period="0" so it will prevent resources files from being cached.

I found it here:

prevent spring mvc resources from being cached

 
reply
    Bookmark Topic Watch Topic
  • New Topic