why Mozilla goes to server for javascript.

P

parghi

i have write one jsp page inside that i have used java scripts .But now

when i used that page in mozzila then mozzila goes to server for java
scripts while this type of problem is not occuring in IE. Please give
me solution why this happens??????????

For javascript mozill goes to server while for the same page IE does
not go. Why please give me solution.
 
E

Erwin Moller

parghi said:
i have write one jsp page inside that i have used java scripts .But now

when i used that page in mozzila then mozzila goes to server for java
scripts while this type of problem is not occuring in IE. Please give
me solution why this happens??????????

For javascript mozill goes to server while for the same page IE does
not go. Why please give me solution.

Appearantly, with the settings you used in IE and FF, IE is caching the
stylesheet, while FF is fetching a fresh one.
Why is it a problem?
Is the stylesheet huge?

Regards,
Erwin Moller
 
R

Randy Webb

Erwin Moller said the following on 8/8/2006 8:01 AM:
Appearantly, with the settings you used in IE and FF, IE is caching the
stylesheet, while FF is fetching a fresh one.
Why is it a problem?
Is the stylesheet huge?

What stylesheet?
 
E

Erwin Moller

Randy said:
Erwin Moller said the following on 8/8/2006 8:01 AM:

What stylesheet?

Hey Randy,

I have no clue what stylesheet you are talking about...
;-)

Sorry, my bad: I ment Javascript file of course.
My guess is one is caching it, the other not.

Regards,
Erwin
 
B

Bobbo

Erwin said:
My guess is one is caching it, the other not.

Some former colleagues of mine experienced this before, and ended up
having to fudge it like this [files have been renamed to protect the
guilty]:

<script type="text/javascript" src="monkey.js?a=1"></script>

then the 'a=1' was updated when the JS was changed, causing the browser
to think it was a different file.

Since I had bigger fish to fry at the time I didn't get involved, but
did think "there has to be a better way than this" and hopefully one of
you is about to prove me right...?
 
R

Randy Webb

Bobbo said the following on 8/8/2006 11:56 AM:
Erwin said:
My guess is one is caching it, the other not.

Some former colleagues of mine experienced this before, and ended up
having to fudge it like this [files have been renamed to protect the
guilty]:

<script type="text/javascript" src="monkey.js?a=1"></script>

then the 'a=1' was updated when the JS was changed, causing the browser
to think it was a different file.

That doesn't always work. If I get the file and it is monkey.js?a=1 and
ten minutes later you change it to monkey.js?a=2 and 10 minutes later I
revisit the page and have my browser set not to check for a new
document, I won't get the new one. The best method - to date - is to
write that script tag with script and append the current time to it.
Since I had bigger fish to fry at the time I didn't get involved, but
did think "there has to be a better way than this" and hopefully one of
you is about to prove me right...?

Depends on what you think you were right about :)
 
B

Bobbo

Randy said:
The best method - to date - is to
write that script tag with script and append the current time to it.

So do you mean this:
monkey.js?t=091200

Or this:
monkey091200.js
Depends on what you think you were right about :)

I was definitely right about not getting involved and frying bigger
fish [mmm .. salmon!] but not quite right about the dummy parameter.
 
R

Randy Webb

Bobbo said the following on 8/9/2006 4:16 AM:
So do you mean this:
monkey.js?t=091200
Yes.

Or this:
monkey091200.js

No.

The first doesn't require anything to be done on the server except to
update the file. The second requires renaming it and falls into the same
trap that ?t= solves.
 

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
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top