-
Notifications
You must be signed in to change notification settings - Fork 2
/
preload3.html
33 lines (27 loc) · 966 Bytes
/
preload3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<title>Responsive preload example</title>
<link rel="preload" href="mint1.jpg" as="fetch" >
<link rel="preload" href="mint3.jpg" as="fetch" >
</head>
<body>
<header>
<h1>My site 13</h1>
</header>
<p id="demo">Will display sub resources: </p>
<script>
var resource = window.performance.getEntries()[0];
<button type="button" onclick='document.getElementById("demo").innerHTML = "fake resource" '>Click Me!</button>
</script>
<img src="mount.jpeg" >
<img src="s_man.gif" style="display: none;" />
<img src="mint1.jpg">
</body>
</html>