473,394 Members | 1,722 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,394 software developers and data experts.

external javascript problem in asp.net 2.0

Hello!

I run into a very anoying problem in asp.net 2.0. I have external JScript file
included in some aspx through <script> tag; In my solution .js file is placed in
custom folder named skripta. Everything is ok when I add new .js file containing
some code. But when I add some new functions to .js (everything doing through visual
studio 2005 editor) they seam to be invisible for the aspx page in which the
external script is referenced. New code added to file just seams to not load as if
it is somewhere old cached file, and it wont update with new data.

After I copy all the code, with the new function added to a new .js file, and then
referenced it instead, it works fine. Where does ASP.NET 2.0 cache .js files?

What's happening, could someone explain , or comment if they had similar experience?

Thanks!
May 2 '06 #1
3 1390
Saving the file with new date/time should make browser refresh it. Check
your client and server time setting.

Eliyahu

"I.g.o.r." <ig**@igor.com> wrote in message
news:Xn*************************@161.53.160.64...
Hello!

I run into a very anoying problem in asp.net 2.0. I have external JScript
file
included in some aspx through <script> tag; In my solution .js file is
placed in
custom folder named skripta. Everything is ok when I add new .js file
containing
some code. But when I add some new functions to .js (everything doing
through visual
studio 2005 editor) they seam to be invisible for the aspx page in which
the
external script is referenced. New code added to file just seams to not
load as if
it is somewhere old cached file, and it wont update with new data.

After I copy all the code, with the new function added to a new .js file,
and then
referenced it instead, it works fine. Where does ASP.NET 2.0 cache .js
files?

What's happening, could someone explain , or comment if they had similar
experience?

Thanks!

May 2 '06 #2
It's not ASP.NET that caches the js file, but the browser. Use ctrl+F5
to try to force the browser to reload all files when you update. If that
doesn't help, empty the browser cache.

I.g.o.r. wrote:
Hello!

I run into a very anoying problem in asp.net 2.0. I have external JScript file
included in some aspx through <script> tag; In my solution .js file is placed in
custom folder named skripta. Everything is ok when I add new .js file containing
some code. But when I add some new functions to .js (everything doing through visual
studio 2005 editor) they seam to be invisible for the aspx page in which the
external script is referenced. New code added to file just seams to not load as if
it is somewhere old cached file, and it wont update with new data.

After I copy all the code, with the new function added to a new .js file, and then
referenced it instead, it works fine. Where does ASP.NET 2.0 cache .js files?

What's happening, could someone explain , or comment if they had similar experience?

Thanks!

May 2 '06 #3
The last post is correct. Clear your cache. This is a browser nugget
that haunts asp, jsp, asp.net... you name it.

May 3 '06 #4

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

Similar topics

1
by: John B. | last post by:
In an effort to turn a little more a module with my pages, I would like to turn my internal javascripts into an external javascript files to supply the information onto a web page. I...
1
by: Chuck Mendell | last post by:
I am having problem with external javascripts. My OS is XP Pro. I am told to create an external javascript using a .js extension. (I did that) The external .js is very simple, containing: ...
5
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have...
17
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script...
1
by: mb | last post by:
Hi, I picked up this JavaScript code (quiz code) at: http://javascript.internet.com/miscellaneous/multiple-choice-quiz.html and modified it (and may have deleted some line I shouldn't have) so...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
1
by: Brian Kendig | last post by:
I've got some questions about using an external javascript file, included via '<script type="text/javascript" src="mycode.js" ></ script>': (1) If I define a function "myFunction()" in the...
10
by: Stefan Weber | last post by:
Hi, I'm trying to access the JavaScript code contained in a <scripttag via its "text" attribute. This works well, if the code is embedded in the HTML page. However, when the code is in an...
3
by: tjtryutyu | last post by:
I know very little javascript. Nonetheless, I found some example code that opens links into a new window if they contain "external" on the "rel attribute. For example: <a href="http:example.com"...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.