|
Subject: Re: [xsl] HTTP server-side check [Corrected] From: "Schimon Jehudah sch@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 14 Jan 2026 08:40:40 -0000 |
Friends. Good day.
I have conducted a client-side analyses of a couple of server-side
services to check whether ECMAScript (i.e. JavaScript) is enabled or
otherwise.
For this proposed solution to properly be implemented, it is important
to be aware that the client-side processed XSLT stylesheet should
differ the server-side processed XSLT stylesheet.
Analyses
--------
It appears that those services have a "middleware" which resets a
counter, upon every request.
After no further requests sent; and, once a certain time gap is reached;
and, availability of ECMAScript was not detected; then, the server
redirects the client.
Assessments
-----------
It seems that "middleware" is useful as a creator and a resetter (i.e.
reset) of a counter.
* A middleware to create a dictionary, to each client, with keys
"time", "ecma", and "xslt".
* A middleware to reset the value of key "time".
If predetermined requests "/?support=ecma" and "/?support=xslt" were
sent, then the respective dictionary keys would have the values of
"True" or "1", otherwise "False" or "0".
ECMA
----
I created script "xhr.js" with these directives, to check ECMAScript.
var xmlHttpRequest;
xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.open("GET", "/?support=ecma", true);
xmlHttpRequest.send();
If server receives a request of "/?support=ecma", the value of "ecma"
be set to "True" or "1", otherwise "False" or "0".
XSLT
----
To check of XSLT, I think that it be useful to add to XSLTstylesheets
automatically loaded elements, such as "audio", "frame", "ifarme",
"img", "object", and "video" with a reference to "/?support=xslt".
If server receives a request of "/?support=xslt", the value of "xslt"
be set to "True" or "1", otherwise "False" or "0".
Please. Read advisory note of "Stage 4" to the Conclusion.
Conclusion
----------
Two "middleware" are required, one to create a dictionary of a client
IP address, and another to reset a counter upon every request.
Two predetermined (or constant) "requests" are required, one of each
(ECMA and XSLT).
Stage 1
-------
client[IP_ADDRESS] = {"time" : TIMESTAMP, "ecma" : None, "xslt" : False}
Stage 2
-------
If client indicates of XSLT, no redirection occurs.
client[IP_ADDRESS] = {"time" : TIMESTAMP, "ecma" : None, "xslt" : True}
Stage 3
-------
If client does not indicate of XSLT; then, server redirects to an XML
document framed inside (X)HTML, with ECMAScript module "SaxonJS" to
process the framed XML document.
client[IP_ADDRESS] = {"time" : TIMESTAMP, "ecma" : None, "xslt" : False}
Stage 4
-------
If client does not indicate of ECMAScript; then, server redirects to a
server-side processed (X)HTML document.
NOTE: The server-side porcessed XSLT stylesheets should not include the
pseudo references of "/?support=xslt".
client[IP_ADDRESS] = {"time" : TIMESTAMP, "ecma" : False, "xslt" : False}
Kindly,
Schimon
On Tue, 13 Jan 2026 17:59:16 -0000
"Schimon Jehudah sch@xxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Good evening.
>
> I beg your pardon for triple messaging.
>
> I added another note to XSLT check, under title "Technicalities",
> about utilizing frames instead of in addition to images.
>
> On Tue, 13 Jan 2026 17:37:08 -0000
> "Schimon Jehudah sch@xxxxxxxxxxxx"
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Ladies and Getlemen. Good evening.
> >
> > *******************************************
> > * This is a corrected message. *
> > * Content of "Possibilities" was changed. *
> > *******************************************
> >
> > I am specifying a what-is-called "middleware" to check two concerns
> > of client request.
> >
> > 1) Whether XSLT is available.
> >
> > 2) Whether ECMAScript (i.e. JS) is available.
> >
> > I wrote about this concern, a month ago or so; and, now, I intend to
> > implement it.
> >
> >
> > Possibilities
> > -------------
> >
> > * If XSLT is detected, then XML document be loaded.
> >
> > * If XSLT is not detected, and JS is detected; then, the server
> > would redirect to a page with a frame with module XSLTProcessor (or
> > SaxonJS, or xslt-processor) to process the XML document.
> >
> > * If neither is detected; then, the server would redirect to a raw
> > (X)HTML document.
> >
> > * Alternatively, it might be that the server would redirect from
> > XML, to (X)HTML with JS, to (X)HTML without JS.
> >
> >
> > Technicalities
> > --------------
> >
> > * XSLT be checked by an image (e.g. an invisible pixel).
> >
>
> Possible elements may be "img", "frame", or "iframe".
>
> I think that frames be better, as disabling of automatic loading of
> images is prevalent.
>
> > * JS be checked by "XML HTTP Request".
> >
> > I ask for your advisories, as to the proper logic to implement this.
> >
> > If you have other comments or criticism about any of the
> > technicalities; then, please, write.
> >
> >
> > Thank you,
> > Schimon
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] HTTP server-side check [C, Schimon Jehudah sch@ | Thread | [xsl] Maybe on-topic? AI and up tra, Dave Pawson dave.paw |
| Re: [xsl] HTTP server-side check [C, Schimon Jehudah sch@ | Date | [xsl] Maybe on-topic? AI and up tra, Dave Pawson dave.paw |
| Month |