Post by MaximumLife » Sun Oct 16, 2022 10:22 pm

Hi,

I wanted to generate the image cache perpetually.

I created a small HTML file that will open each link listed every 10 seconds. A great way to generate the image cache.

You can simply open the HTML file in Chrome and then go to chrome:\\discards and disable discarding.

Next, change your computer settings to prevent it from sleeping.

Let the process run!

Good luck!

Code: Select all

<!doctype html>
<html>
<head>
<title>OpenCart Cache Generator</title>
<script>
function sleep(milliseconds) {
  const date = Date.now();
  let currentDate = null;
  do {
    currentDate = Date.now();
  } while (currentDate - date < milliseconds);
}

function openWindow(){
    var x = document.getElementById('a').value.split('\n');
    for (var i = 0; i < x.length; i++)
        if (x[i].indexOf('.') > 0) {
            if (x[i].indexOf('://') < 0) {
                window.open('https://'+x[i]);
        	}
            else {
                window.open(x[i]);
			}
		sleep(10000);
		}
}
</script>
<style>
html, body
{
    height : 99%;
    width  : 99%;
}

textarea
{
    height : 80%;
    width  : 90%;
}
</style>
</head>
<body>
<textarea id="a"></textarea>
<br>
<input type="button" value="Open Windows" onClick="openWindow()">
<input type="button" value="Clear" onClick="document.getElementById('a').value=''">
</body>
</html>

Life Is A Journey. Enjoy It :)


Newbie

Posts

Joined
Sun Oct 16, 2022 10:17 pm
Who is online

Users browsing this forum: No registered users and 68 guests