VS2005 - .net 2.0 SP1 - Include javascript files into a page... I change the js file... my applicati

F

Fabio Mastria

Looks like a joke... :


As I say in the subject...

I create a javascript file, with this function:

function IndexChanged(source){

alert("Hallo");

return true;}

I include the file into a page with <script src="JS/filejs.js"
language="javascript" type="text/javascript"></script>, under the body

this function is used on the onclick of a component.

All works... BUT

I change the function, deleting the alert message...

press play

and when onclick is newly raised... I see again the alert message
(deleted!!)

Close VS2005... reopen it.... nothing... i see this alert...

BUT

if I erase the temporary files from internet explorer (vs 7), I don't see
the alert!

Just a question.... WHY?????

This problem looks like if it's not present if the function is in a script
block into the page and not saved in a js file...

Thanks to everyone!!!

Regards
Fabio
 
C

Cowboy \(Gregory A. Beamer\)

Are you using a web application project type or a web site project type?

This is important, as everything is essentially compiled with the
application, which means the changes in source on the page are ignored until
you recompile. Try Build or Rebuild and see if the new JS is there. If so,
you can either switch to standard web site project or compile before
testing.
 
B

bruce barker

browsers have this cool feature called page caching. a js file is just a
static page and the common default is to cache it for 1 day.

unfortunately an f5 (refresh) in IE does not reload cached scripts. you
may want to just switch to firefox.

-- bruce (sqlwork.com)
 
F

Fabio Mastria

Cowboy said:
Are you using a web application project type or a web site project
type?

This is important, as everything is essentially compiled with the
application, which means the changes in source on the page are
ignored until you recompile. Try Build or Rebuild and see if the new
JS is there. If so, you can either switch to standard web site
project or compile before testing.

Web application... :)

Nothing occurs if I recompile the entire solution...
 
F

Fabio Mastria

bruce said:
browsers have this cool feature called page caching. a js file is
just a static page and the common default is to cache it for 1 day.

unfortunately an f5 (refresh) in IE does not reload cached scripts.
you may want to just switch to firefox.

My site gets change its layout on firefox in a manner that I don't know
manage actually...
 
J

Jose A. Fernandez

C

Cowboy \(Gregory A. Beamer\)

How are your browser settings? By default, IE stores cached pages. I believe
Firefox is set up the same way. One of the first things I do when developing
is set to get a new copy each hit. Yes, it slows down Internet a bit, but
with broadband it is not a big deal.
 
F

Fabio Mastria

Cowboy said:
How are your browser settings? By default, IE stores cached pages. I
believe Firefox is set up the same way. One of the first things I do
when developing is set to get a new copy each hit. Yes, it slows down
Internet a bit, but with broadband it is not a big deal.

But users will have the same problem?

I can't ask them to setup the browser in a specific way
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top