I was browsing the source code of some website, and noticed a dll file being used as the src of a <script>.
(view-source:http://www.yellowbridge.com/onlinelit/baijiaxing.php)
It was something like: <script src="some-dll-file.dll"></script>
Several questions:
- I didn’t know a
<script>could be anything besides js. What else can it be used for? - Can you point me in the direction of some more information on this topic? I’ve tried ggoogling around, but realized that I don’t know what I should be googling exactly.
- Is this cross-platform? I mean if I were to try this on epiphany on an ubuntu box, would it function and serve its purpose?
I’m on a windows box right now and won’t have access to anything else for a while, so I can’t test it myself.
Only JavaScript can be used as the client-side scripting language (and VBScript too, in IE). The
srcattribute just specifies some URL, and that URL will return the JavaScript.So, the URL http://www.yellowbridge.com/lib/yellowbridge.dll actually does return JavaScript. If you save its contents as a local text file, you can read the script.
Without knowing anything about the site or its JavaScript, I would guess they are dynamically generating some part of the script file from the DLL.
Edit: actually, looking at generated JS, I guess it’s dynamically compressing the script on its way to the client.