Moving the inline js before the CSS
This allows browsers to do smarted parallel downloads Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
e26f138fc5
commit
1ae56b054b
|
@ -12,17 +12,17 @@
|
||||||
<link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
|
<link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
|
||||||
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
|
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
|
||||||
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
||||||
|
<?php if (isset($_['inline_ocjs'])): ?>
|
||||||
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
||||||
|
<?php print_unescaped($_['inline_ocjs']); ?>
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
<?php foreach ($_['cssfiles'] as $cssfile): ?>
|
<?php foreach ($_['cssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if (isset($_['inline_ocjs'])): ?>
|
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
|
||||||
<?php print_unescaped($_['inline_ocjs']); ?>
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php foreach ($_['jsfiles'] as $jsfile): ?>
|
<?php foreach ($_['jsfiles'] as $jsfile): ?>
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
<link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
|
<link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
|
||||||
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
|
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
|
||||||
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
||||||
|
<?php if (isset($_['inline_ocjs'])): ?>
|
||||||
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
||||||
|
<?php print_unescaped($_['inline_ocjs']); ?>
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if (isset($_['inline_ocjs'])): ?>
|
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
|
||||||
<?php print_unescaped($_['inline_ocjs']); ?>
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
|
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
|
||||||
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
|
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
|
||||||
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
|
||||||
|
<?php if (isset($_['inline_ocjs'])): ?>
|
||||||
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
||||||
|
<?php print_unescaped($_['inline_ocjs']); ?>
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
<?php foreach($_['printcssfiles'] as $cssfile): ?>
|
||||||
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if (isset($_['inline_ocjs'])): ?>
|
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
|
|
||||||
<?php print_unescaped($_['inline_ocjs']); ?>
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
||||||
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
Loading…
Reference in New Issue