This page documents how SSI behaves on this server and other tips if you want to make a website compatible with ancient computers from the 90s.
It's split up in three parts:
It wasn't the default case that web pages on the Internet ran code on the client side (aka browser), so any dynamic changes were done by the server as the user requested the page.
All these will work on EVERY device and browser regardless if Javascript is enabled or not.
Especially the User-Agent is very interesting to use.
I'm using it to show short messages to specific browsers on the main index and also globally include extra support data to fix up browser quirks and bugs.
Special thanks to *x.narod.ws* for showing it off first. I wasn't aware that this server supports this.
As Web 1.0 Hosting uses nginx, means that this is the correct *documentation* for these features and the *embedded variables* that should be available.
Here's what each SSI command produces, the echo results are BOLD and the corresponding HTML tags are followed in a monospaced font to make it easier to understand.
Variable 'test':
(none)
<!--#echo var="test" -->
Now this directive sets the variable after REMOTE_ADDR and REQUEST_METHOD.
<!--#set var="test" value="IP:${REMOTE_ADDR} and ${REQUEST_METHOD}" -->
Variable 'test':
IP:216.73.217.6 and GET
<!--#echo var="test" -->
If you want an '$' inside your value then escape it with '\'. (example: var="\$10")
This is also applicable to all expressions.
(example: expr="${REQUEST_URI} = \/error404.html")
Your IP:
216.73.217.6
<!--#echo var="REMOTE_ADDR" -->
Port used to load this page (80=HTTP,443=HTTPS):
80
<!--#echo var="SERVER_PORT" -->
User-Agent:
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
<!--#echo var="HTTP_USER_AGENT" -->
Local time of the server:
Friday, 17-Jul-2026 22:14:20 UTC
<!--#echo var="DATE_LOCAL" -->
Local time of the server (URL encoded):
Friday,%2017-Jul-2026%2022:14:20%20UTC
<!--#echo var="DATE_LOCAL" encoding="url" -->
The encoding parameter affects all following echos too!
So you must set it back on the next echo command. (if needed)
Also be CAREFUL with the encoding "none", this could lead to *HTML injection*!!! (on older browsers)
GMT time of the server:
Friday, 17-Jul-2026 22:14:20 GMT
<!--#echo var="DATE_GMT" encoding="entity" -->
"time_t" (Unix timestamp) with milliseconds:
1784326460.080
<!--#echo var="MSEC" -->
Request ID (16 random bytes):
a092e88a3f0e90dbdbefd483f894f3b3
<!--#echo var="REQUEST_ID" -->
You came from:
(none)
<!--#echo var="HTTP_REFERER" -->
Languages that your browser requests:
(none)
<!--#echo var="HTTP_ACCEPT_LANGUAGE" -->
The HTTP "from:" field (the email of the owner, only sent by bots):
(none)
<!--#echo var="HTTP_FROM" -->
All variables that start with HTTP_ are the *header fields* from the HTTP request.
The server will convert all these into variables that can be used in SSI (and CGI).
For example, a made up non-standard "My-Favorite-Game: Tetris for Gameboy" in the HTTP request would create the variable HTTP_MY_FAVORITE_GAME loaded with the value "Tetris for Gameboy".
As you can tell, the name *will be converted* to uppercase and all '-' gets changed to '_'.
You've requested page:
/misc/webtricks.html
<!--#echo var="REQUEST_URI" -->
Relative URL of this file:
/misc/webtricks.html
<!--#echo var="URI" -->
URL decoding (like converting %20 into spaces) is not supported on nginx! (avoids HTML injection!)
Query string (text after ? at the URL end):
(none)
<!--#echo var="QUERY_STRING" -->
Query string that shows something else than (none):
There was no query string in the request
<!--#echo var="QUERY_STRING" default="There was no query string in the request" -->
You can also put these inside any tags and even within string quotations.
So something like this actually works to use any image URL after the ?:
<img src="<!--#echo var="QUERY_STRING" -->" >
Security sidenote:
This may enable to point to malicious URLs and it would be advised to filter out anything pointing to outside domains.
Which can be done like this (mind the qwertz in the first comparsion):
<!--#if expr="${QUERY_STRING} = /^http*.://qwertz\.(w10\.site|w0\.am|narod\.ws|oldcities\.org)/" -->
<img src="<!--#echo var="QUERY_STRING" -->" >
<!--#elif expr="${QUERY_STRING} != /\/\//" -->
<img src="<!--#echo var="QUERY_STRING" -->" >
<!--#else -->
The URL is pointing to an outside domain!
<!--#endif -->
(the first #if to allow http(s) to this site itself then the #elif skips if "//" was found which will be the case for an outside domain, also don't forget to add your custom domain name if you have one)
This is very useful for the Nintendo 3DS browser which fails to open .JPGs directly and this makes it work.
I've already wrote a script file that changes all hrefs that end with .JPG on the client-side to point to this:
Click here for the main banner and here for the small banner.
With this is in the HTML header makes only effective for the Nintendo 3DS:
<!--#if expr="${HTTP_USER_AGENT} = /Nintendo 3DS/" -->
<script defer type="text/javascript" src="/jpgfix.js"></script>
<!--#endif -->
With this command you can define the format of the DATE_LOCAL and DATE_GMT.
Change time format of DATE_LOCAL to show seconds:
<!--#config timefmt="%S" -->
Time in seconds:
20
<!--#echo var="DATE_LOCAL" -->
Now this will revert it back:
<!--#config timefmt="%A, %d-%b-%Y %T %Z" -->
Local time of the server:
Friday, 17-Jul-2026 22:14:20 UTC
<!--#echo var="DATE_LOCAL" -->
This is the most useful SSI feature of all, enclosing the comparsion with slashes '/' enables *RegEx*, otherwise it's a simple comparsion.
(you may need to escape any '/' with '\' like "${REQUEST_URI} = \/error404.html")
You're connected via:
IPv4
<!--#if expr="${REMOTE_ADDR} = /:/" -->IPv6<!--#else -->IPv4<!--#endif -->
What I think of your browser:
I have no idea what frickin browser you're using.
The HTML for above:
<!--#if expr="${HTTP_USER_AGENT} = /Opera/" -->Opera
<!--#elif expr="${HTTP_USER_AGENT} = /^Mozilla.*Chrome/" -->Chrome
<!--#elif expr="${HTTP_USER_AGENT} = /^Mozilla.*Mypal/" -->Mypal
<!--#elif expr="${HTTP_USER_AGENT} = /^Mozilla.*Palemoon/" -->Palemoon
<!--#elif expr="${HTTP_USER_AGENT} = /^Mozilla.*Firefox/" -->Firefox
<!--#elif expr="${HTTP_USER_AGENT} = /^Mozilla.*MSIE/" -->Internet Explorer
<!--#elif expr="${HTTP_USER_AGENT} = /Lynx/" -->Lynx
<!--#else -->Unknown<!--#endif -->
Nesting or making more than one single comparison is not supported, so it must be fit in single RegEx!
But you could use a seperate file for that purpose. That actually works, see below.
The next part is hidden unless a "?show-test.html" is appended to the URL.
Click HERE to do that.
<!--#if expr="${QUERY_STRING} = show-test.html" -->
<!--#include file="/private/test.html?Test_VAL=$QUERY_STRING" -->
<!--#endif -->
Keep in mind that the file="" will be treated as file="index.html".
Also specifiying a file that doesn't exist will yield into your error404.html (or the internal 404 one).
The stub parameter does indeed work fine though. (a fallback defined with #block and #endblock)
It is possible to include stuff based if a cookie exists or holds a certain value.
Now setting a cookie could be a bit difficult, as it was originally intended to be sent by the web server as a *HTTP response field "set-cookie"* or alternatively via JavaScript which in itself wouldn't work if disabled or unsupported.
The best way to set these on this server would be a CGI script designed to repack the query string into a "Set-Cookie" field while redirecting to a different page or back to the previous page (HTTP_REFERER).
Sure there are risks and controversies involved with this touchy topic.
Like these darn "We need to inform you that we're using 3rd party cookies and need your approval" popups that are all over the modern internet because owners of these bigshot sites wanna make the big bank with tracking 'n shit.
But for a static website like this one it's more useful as a user setting.
Like choosing a color/theme, enabling layout preferences or even show certain content like NSFW stuff only if a user clicked the good old "I'm over 18" button before.
Yeah, it's crazy to think that back then anything more sophisticated wasn't possible or so damn annoying that any sane person would've left that place instantly.
Now to test this you need to open the JS console (commonly with F12) and copy paste this:
document.cookie="QTEK_TEST=This_is_a_cookie!"
Then refresh this page.
Now one last thing.
The name MUST BE UPPERCASE and the only special character that worked was the underscore.
Everything else errored out when I've tried it.
I'm thinking of using that to enable setting a fontsize for mobile users or a HTML-only zoom option for modern desktop browsers.
If there was a CGI script that would generate a random number then it would just as easy to include a random file named after the random number.
For example if the random number is between 1-10 stored in a variable named "rand" then it could be possible to insert the contents of 1.txt, 2.txt, 3.txt ... or 10.txt with file="${rand}.txt".
This simple method would be less processing intensive than parsing a huge #elif chain.
<!--#include virtual="/cgi-bin/counter/?term=d" set="newtest" -->
Variable 'newtest':
48
<!--#echo var="newtest" -->
Here's some tips for targeting ancient 90s browsers like IE3 (only the Win95 version supports CSS):
Now it's fine to reference some modern features, it will be (likely) ignored without side effects.
This is quite useful for allowing to scale the images without filtering:
img { image-rendering: pixelated; image-rendering: crisp-edges }
This should work in all Chrome and Firefox based browsers since 2011-2013.
The browser should pick out whatever value it understands.
Even this simple format has it's pitfalls and other browser dependant quirks.
For some reason the <wbr> didn't work but I've found out that </nobr><nobr> does the same thing.
However, modern browsers will ignore it if there's nothing in between (stupid HTML optimization) which causes a undesired horizontal scrollbar to appear.
So it is required to write that as </nobr> <nobr> to avoid that problem.
Here's a example of that with a space character:
Click HERE to show the example without space character.
Also very old browsers don't append query strings to the current URL if the link starts with '?', so it is required to reference the filename of the current page first.
Anchors should be placed at the beginning of the line for IE, or else it may scroll to the next line instead:
<h4><a name="html"></a>- Hypertext Markup Language -</h4>
Here's simple table code that I use for formatting if pictures/tables could overlap with the next section:
<table border="0" width="100%" cellspacing="0">
<tr>
<td valign="top">
CONTENT GOES HERE (another table and text)
</td>
</tr>
</table>
One last note:
PNG was introduced in 1996 and IE3 also came out at the same time if not before that.
Which is why I don't use it. Only GIF and JPG are used to remain compatible with that dinosaur.