Ticket #3 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Some khtml-based browsers do not re-load jsolait modules

Reported by: jwashin@vt.edu Assigned to: Jan-Klaas Kollhof
Priority: normal Milestone: 2.0
Component: jsolait-core Version: 1.x
Severity: normal Keywords:
Cc:

Description

Looking at the 2005-09-16 beta of jsolait.js, the pertinent part is in the getFile function around line 792

The problem with konqueror (3.5 rc1 ATM, but it happened also with older versions of safari) is that for this line:

if(xmlhttp.status == 200 xmlhttp.status == 0 )

xmlhttp.status is undefined if the desired file is already in the browser cache, so loading fails.

This is a browser bug. But enough browsers are around that have this behavior that it might be worthwhile to fix.

One possible solution is to force a refresh of the desired file by tacking a ?something=randomsomething onto the url and trying to load the file one more time if the xmlhttp.status condition fails.

Change History

11/24/05 17:21:21 changed by Jan-Klaas Kollhof

  • status changed from new to assigned.

You say the status is undefined, but does the response contain the actual (cached) source data of the file to load ? If so I could just add xmlhttp.status == null to the if statement. I'd rather do that than adding something to the URL.

11/24/05 17:23:10 changed by Jan-Klaas Kollhof

  • milestone set to 2.0.

11/25/05 12:34:50 changed by jwashin@vt.edu

Response does in fact contain the data.

Adding xmlhttp.status == null seems to work today on konqueror.

11/25/05 15:53:03 changed by Jan-Klaas Kollhof

  • version changed from 1.x to 2.0.

OK, I think I fixed it to accept status == null as a valid response status. As I don't have a mac nor linux desktop running at the moment can someone please test it?

Jan

11/25/05 15:53:35 changed by Jan-Klaas Kollhof

  • version changed from 2.0 to 1.x.

01/25/06 19:27:13 changed by erre@telia.com

I had to add xmlhttp.status == 304 to get imprt() to work with konqueror 3.5 and jsolait 2.0a (2006-01-09). With this it also works even if I remove xmlhttp.status == null. I can also confirm that this approach works with safari 2.0.3 and firefox 1.5.

304 is the status for Not Modified.

01/27/06 12:05:02 changed by Jan-Klaas Kollhof

OK I will add the xmlhttp.status == 304

01/27/06 12:08:14 changed by Jan-Klaas Kollhof

  • status changed from assigned to closed.
  • resolution set to fixed.