LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > JavaScript not changing.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2008, 10:49 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
Question JavaScript not changing.

I'm not sure why or how, but for some very odd reason my java isn't changing.

I have a search routine that works fine in all browsers except IE (of course) and returns Undefined for IE. Not a problem. So I went into my Java to trouble shoot it, changed a few things, and went to test. Same result. After doing this for a while I decided to add an alert() to the function to check if something is being triggered... No alert was fired. So at this point, I'm thinking that there is a duplicate script or function name somewhere. There isn't. I've commented out the entire function and it still is unchanged. I opened up the page in a fresh browser and it STILL isn't changed... So now I think it's a static files that's been cached by the server and the server doesn't want to let go of it.

Any thoughts?
Thanks,
Matt.
Edit/Delete Message
Reply With Quote
  #2  
Old 04-05-2008, 06:07 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Please try a command line tool to download the script like

lynx -mime_header URL
wget URL

LSWS should update its cache when a file has been changed. Sometimes browser caches it.
Reply With Quote
  #3  
Old 04-05-2008, 06:09 PM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
I know. I tried a fresh browser that had never been to the page (safari) and then tried Opera 9 (which was also new to the page). But I went to the script directly www.example.com/thescript.js and it came up with the modified version!
Reply With Quote
  #4  
Old 04-06-2008, 12:52 PM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
After disabling GZIP, all my JavaScript files changed to what they should be now...

Any suggestions? Honestly, I don't need gZip compression yet. But as the site starts taking on more and more bandwidth draws, gZip would be nice.
Reply With Quote
  #5  
Old 04-07-2008, 11:15 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
You have to clear the browser cache if you test it using browser.
Reply With Quote
  #6  
Old 04-07-2008, 11:19 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
I did... And like I said, I tried different browsers that had never been to that page. I was also being paranoid and tried it from a fresh Windows XP install on a virtual machine and there was no change. But like I said, after removing GZip compression, the new java was working fine.

Note that changes made to any PHP or HTML went through fine. Only JavaScript was an issue.

Last edited by Matthew_K; 04-07-2008 at 11:26 AM..
Reply With Quote
  #7  
Old 04-07-2008, 03:13 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Probably is a problem with the gzip cache. We will check.
Reply With Quote
  #8  
Old 04-07-2008, 03:27 PM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
Sounds good. Glad you're on it. Let me know if you need any help for testing or anything.
Reply With Quote
  #9  
Old 04-07-2008, 06:40 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
LSWS update gzip cache based on the timestamp of the origianl file and the gzip file in the cache. So, you can check the modified time of that java script file, if it has been changed, the gzipped file should be changed as well.

Try
"touch <javascript file>"
to update the timestamp.
Reply With Quote
  #10  
Old 04-07-2008, 06:48 PM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
touch? I've never heard of that. How do you do that?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:10 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.