Why download this .json file?
-
Continuing the discussion from The Official Status Thread:
Status: Discovered a race condition in IE9 due to how it handles forms submitted as an Ajax request.
Since I have a beforeunload listener, I release a record lock upon exiting the page (among other things) through a synchronous ajax (I know, ) call.
Because the "helper" addin that supposedly prevents older versions of IE trying to download Ajax requests is not quite working, IE thinks we're leaving the page when submitting a form in an Ajax request, and thus the record is unlocked.
This of course, happens and completes before the form submission, part of which relies on the record being locked to the submitter's session.So, now I need to figure out why Non-Intrusive Ajax isn't working (again). sigh
-
I release a record lock upon exiting the page
Please tell me there's a timeout and people can't lock items permanently by accident.
-
Yeah, I made it 10 minutes by default, and the app is supposed to refresh the lock every two minutes so long as the form is open.
At present, removing the lock is as easy as deleting the record, but the app is not currently able to handle that properly. Essentially, if it knows there wasn't a lock before, it asks for one and assumes it holds the lock, refreshing every two minutes until stopped. Since it doesn't check for an expired lock during refresh (it probably should, huh?) upon next refresh it will automatically recreate the lock if it was "unexpectedly" released.The page is prepared to watch a lock placed by someone else (in the style of Excel or Word), but does not have facilities to merge changed data.
-
How about grabbing the lock whenever the user touches the page (so, when they first open it, and then if they edit anything in form fields, and then if they submit the form)? That way, you're guaranteed to have the lock if the user is using the page and not to have the lock if the user leaves the page open and goes to get lunch (although the lock will be re-obtained the moment the user touches the page when they get back).
-
Possibly. Ideally the user will finish their form in a timely manner, but there's no reason to kick them out for being idle. The app is essentially a two-stage audit, where the first agent submits a form, and at some later point any identified errors noted (not on due to the form, from the data the first put in) are remediated.
So long as the agent eventually completes the remediation on the form at some point (or closes the browser/logs of/whatever), the lock will be removed and some other second agent can come in and do it.
I don't really foresee an agent abusing the system like this, but lock reports can be generated for scolding later if necessary.
-
Let me guess, you're serving the JSON file with the proper MIME type of application/json? IE9 doesn't like that and assumes any MIME type it doesn't like should be downloaded and saved.
If you're using IE9, send with Content-Type text/html instead and IE9 won't barf on it. IE10 gets this right though.
-
Yeah, I remember handling it specially in an older app, I just have to dig out where I did it.
The nice thing is that we're supposed to be deprecating IE9 by the end of the year, and shifting everyone to IE11 by end of first quarter 2016, so there's that.If I'm bored I'll do it, otherwise I'll just say, "Ignore it for now, we're working on a fix."
-
-
@Tsaukpaetra said:
I don't really foresee an agent abusing the system like this
Yeah, but...users.It's a good thing those users aren't us!
-
Yeah, but...users.
Are still clueless behind the magic behind the instructions "Don't try to open this powerpoint at the same time as someone else and expect to be able to save your changes". In bold, red, 28 pt text.
those users aren't us!
I fully expext the site to break within an hour if I unleashed this site's users on it.
For one, half of the security isn't implemented yet, and anyone with the aptitude to guess URLs will find /EditForm to be the place where you fsck with the forms.That's only the
biggestfirst thing on the todo list.
Also, anyone with a domain login (or who can spoof the IIS Windows Domain Login) can access the forms to fill them, or access in-progress forms from any other user.Did I mention the business users are
activelyoccasionally when poked by management using the Dev instance ?
-
-
You fully expects it to break?
Yes indeed! I can't "Expect" it to break, for that would be a sign of incompetence after all.
However, I can expext it to break, for that means that I have a documented scenario signed off by the business that says such a point of failure is a negligible risk and that remediation for the problem is more cost affective than spending time fixing it before that happens.
-
But did you get the signoff on the memo that addressed the failure of your spellchecker? ;)
-
failure of your spellchecker?
What spellchecker? They disabled that after it kept flagging words like "productionalize" in all their messages.
-
If you're not smart enough to type it right the first time, you obviously didn't take part in the time when we had mechanical typewriters with no such thing as "erase"
Ah, but I did. I've posted before about getting a negative net typing speed on a test.
-
-
@accalia? Is that you?
well it's true the last time i took a typing speed test i overflowed the WPM counter..... which actually brought my score positive.....
-
:puzzled:
-
puzzled
You can negatively overflow a counter.
Filed under: It's what happens if you wait long enough after falling through the VOID.
-
We call that an "underflow" to differentiate it from an overflow. Unless you mean you overflow so hard it wraps around...
-
@PleegWat said:
puzzled
You can negatively overflow a counter.
Filed under: It's what happens if you wait long enough after falling through the VOID.
Not so much what she did but what kind of algorithm that typing test must have used to allow one to go that negative.
-
"underflow" to differentiate it from an overflow
Ah. Buffers. That's different.
I was under the impression we were talking about a single numeric entity having the attributes of a bounded linear incrementable object that doesn't prevent wraparound upon exceeding limits.
To me, underflow means you're not providing enough data to maintain a datas' flow rate. In the context of the above, underflow would be not providing enough data to fill the object (i.e. null).
allow one to go that negative.
Easy. One that uses timed increments to measure your speed that doesn't bound a lower limit when it subtracts 1 every minute when you fail to complete a word within one minute.
-
In the context of the above, underflow would be not providing enough data to fill the object (i.e. null).
Sounds about right! We all know that what Cali does isn't typing! It's swyping! So there was no typing for the typing test to measure!
Now a swyping test would be a whole other ballgame...
-
To me, underflow means you're not providing enough data to maintain a datas' flow rate.
Isn't that a buffer underrun.
-
Isn't that a buffer under run.
Point conceded. Applying words across concepts isn't always pedantically correct.However,
In the context of the above, underflow would be not providing enough data to fill the object (i.e. null).
-
One that uses timed increments to measure your speed that doesn't bound a lower limit when it subtracts 1
every minute when you fail to complete a word within one minutefor each error.FTFM