This check browser type and go link tip page plugin.
Browser:
import cdn
<!-- Browser -->
<script src="https://xqgj.cc/xqcdn/libs/xqisie/xqisie.min.js"></script>
<!-- es module -->
<script type="module">
import isie from '../lib/isie-esm.min.js';
</script>
Node:
npm install isie
const isie = require('isie');
- check browser
const browser = isie.check();
console.log('Browser is:', browser);
- go link
isie.goLink('./page/index.html');
- node
const http = require('http');
const isie = require('../lib/isie');
const server = http.createServer((req, res) => {
if (req.url === '/') {
const ua = req.headers['user-agent'];
const browser = isie.check(ua);
if (browser) {
res.end('browser is:'+browser);
} else {
res.end('thanks.');
}
}
});
server.listen(3000, 'localhost', () => {
console.log('isie server is running on http://localhost:3000 !');
});
Run this script to view the demonstration case: npm run test:node
, npm run test:browser
.