[Gllug] OT: Anyone know Jquery & JSON ?

Walter Stanish walter.stanish at saffrondigital.com
Tue Nov 9 18:55:00 UTC 2010


> Walter: having done "WAY too much of this stuff" maybe you could
> enlighten me why I should always timestamp my AJAX queries.

Not sure where you read that, however...

Historically there were issues with browser caching that made repeat
HTTP queries unreliable if used frequently - the risk was that the browser
or a proxy (transparent or otherwise) served up the same result as
last time without actually performing the query to the target server.

I seem to remember issues here with Mozilla being the topic in an
IRC channel to do with web development (probably #javascript) for
some time.  (Which is not to imply that Javascript developers
prefer IE - quite to the contrary!)

Anyway, placing a timestamp or random value within the URL
itself can help to mitigate cache-related issues by ensuring that
intermediary systems treat the query as unique and thus pass
it through rather than returning a cached result.

Re: unit-testing, commenting, libraries ... all good practice, but
seems like smashing an egg with the death star.

Re: SOAP in particular, it's a sort of 'design by committee' type
'enterprise' protocol so it's not surprising that it wants a timestamp
or transaction ID.  This facilitates complex processing at the
remote end easily, whilst adding to overhead.

Recently I did an integration where SOAP was used with WSSE
(an EVIL little package, that one) and timezone synchronisation
caused weeks of pain.  Turned out if you were 2 seconds out,
the remote end would reject your request as if it didn't know
who you were...

Also, discovered some 'tested and proven' libraries were not, in
fact, 100% functional.

There's so many people getting on the web services bandwagon,
where really http://$server/<$program>?arg1=value&arg2=value is
already a perfectly reliable 'web service'.

When in doubt, go minimal.

- Walter
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list