Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style id="s"></style>
5 <script type="text/javascript">
7 // Duplicates the string 2^n times
8 function exp(s, n)
9 {
10 for (var i = 0; i < n; ++i)
11 s += s;
12 return s;
13 }
15 var stylesheet = "@-moz-document url(http://www.w3.org/)" + exp(", url-prefix(file:///)", 20) + " { }";
16 document.getElementById("s").textContent = stylesheet;
18 </script>
19 </head>
20 <body>
21 <div></div>
22 </body>
23 </html>