473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

VS2005 - .net 2.0 SP1 - Include javascript files into a page... I change the js file... my application see always the old version!

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


Feb 26 '08 #1
7 1516
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Fabio Mastria" <di******@mastriaconsultants.comwrote in message
news:39**********************************@microsof t.com...
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


Feb 26 '08 #2
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)

Fabio Mastria wrote:
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

Feb 26 '08 #3
Cowboy (Gregory A. Beamer) wrote:
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...
Feb 27 '08 #4
bruce barker wrote:
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...

Feb 27 '08 #5
Hi Fabio
As Bruce says... cache browser
You "salt cache" with CTRL+F5 , but i dont remember if this option
"refresh" .js files...try
Another tools is:
- Internet Explorer Developer Toolbar
http://www.microsoft.com/downloads/d...displaylang=en
Is very cool, for example you can delete browser cache completely, or
for domain.
Usefull for developers

______________________
Jose A. Fernandez
blog: http://geeks.ms/blogs/fernandezja
On 27 feb, 12:07, "Fabio Mastria" <dipie...@mastriaconsultants.com>
wrote:
bruce barker wrote:
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...
Feb 27 '08 #6
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Fabio Mastria" <di******@mastriaconsultants.comwrote in message
news:41**********************************@microsof t.com...
Cowboy (Gregory A. Beamer) wrote:
>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...

Feb 27 '08 #7
Cowboy (Gregory A. Beamer) wrote:
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
Feb 28 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Trvl Orm | last post by:
I am working with 2 frames, Left and Right and the main code is in the left frame, which has been attached. Can someone please help me with this code. I am new to JavaScript and can't figure it...
7
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a...
4
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
5
by: NoNickname | last post by:
Basically, how do I know that the release versions of all components are being published? The Build | Configuration Manager is confusing me a little in VS2005. I have three projects in my...
15
by: Joseph Geretz | last post by:
OK, I'll admit it up front - I just don't get it. Here's our previous VS2003 development model. Developers develop the WS solution on their own workstations, using their own IIS web servers...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
7
by: mark4asp | last post by:
How can I prevent Caching of JavaScript and CSS files ONLY when I deploy a new application? I only want to force a refresh the first time the client uses the new build. For instance, I'm told I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.