move everything to headers
parent
4a1253680c
commit
1118cc56eb
|
@ -12,7 +12,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve index.html under /
|
||||
args.app.get('/', function(req, res)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/index.html"));
|
||||
sendPadHeaderFiles(res, function(){
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/index.html"));
|
||||
});
|
||||
});
|
||||
|
||||
//serve robots.txt
|
||||
|
@ -78,3 +80,21 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
|
||||
|
||||
}
|
||||
|
||||
function sendPadHeaderFiles(res, callback){
|
||||
res.set('Link', '<static/js/require-kernel.js>; rel=prefetch \, \
|
||||
<javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define>; rel=prefetch \, \
|
||||
<javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define>; rel=prefetch \, \
|
||||
<javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define>; rel=prefetch \, \
|
||||
<javascripts/lib/unorm/lib/unorm.js?callback=require.define>; rel=prefetch \, \
|
||||
<static/custom/pad.js>; rel=prefetch \, \
|
||||
<static/js/html10n.js>; rel=prefetch \, \
|
||||
<static/js/l10n.js>; rel=prefetch \, \
|
||||
<static/css/pad.css>; rel=prefetch \, \
|
||||
<static/custom/pad.css>; rel=prefetch \, \
|
||||
<static/css/iframe_editor.css>; rel=prefetch \, \
|
||||
<pluginfw/plugin-definitions.json>; rel=prefetch \, \
|
||||
<locales.json>; rel=prefetch \, \
|
||||
<static/font/fontawesome-etherpad.woff>; rel=prefetch');
|
||||
callback();
|
||||
}
|
||||
|
|
|
@ -33,23 +33,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
||||
<link rel="shortcut icon" href="<%=settings.favicon%>">
|
||||
<link rel="localizations" type="application/l10n+json" href="locales.json">
|
||||
<link rel="prefetch" href="static/css/pad.css">
|
||||
<link rel="prefetch" href="static/custom/pad.css">
|
||||
<link rel="prefetch" href="static/js/require-kernel.js">
|
||||
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define">
|
||||
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define">
|
||||
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define">
|
||||
<link rel="prefetch" href="javascripts/lib/unorm/lib/unorm.js?callback=require.define">
|
||||
<link rel="prefetch" href="static/custom/pad.js">
|
||||
<link rel="prefetch" href="pluginfw/plugin-definitions.json">
|
||||
<link rel="prefetch" href="locales.json">
|
||||
<link rel="prefetch" href="static/font/fontawesome-etherpad.woff">
|
||||
|
||||
<!--
|
||||
No point prefetching these as we load them below??...
|
||||
<link rel="prefetch" href="static/js/html10n.js">
|
||||
<link rel="prefetch" href="static/js/l10n.js">
|
||||
-->
|
||||
|
||||
<script type="text/javascript" src="static/js/html10n.js"></script>
|
||||
<script type="text/javascript" src="static/js/l10n.js"></script>
|
||||
|
|
Loading…
Reference in New Issue