Force reload of images every time user clicks search button

Adding a random, unused url param at the end of the img.src string
fixes the issue. As the browser thinks it's a new image and doesn't
use the image data that's already cached because of which it wasn't
even making the fetch call for the image
This commit is contained in:
Debanjum Singh Solanky
2022-07-15 23:14:41 +04:00
parent a6aef62a99
commit 231cc91e14

View File

@@ -2,7 +2,7 @@
<script>
function render_image(item) {
return `<a href="${item.entry}">
<img src="${item.entry}"
<img id=${item.score} src="${item.entry}?${Math.random()}"
title="Effective Score: ${item.score}, Meta: ${item.metadata_score}, Image: ${item.image_score}"
class="image">
</a>`