Skip to content

Commit

Permalink
Merge pull request #1499 from zauberzeug/search_index
Browse files Browse the repository at this point in the history
Website: ensure search_index.json is not cached between versions
  • Loading branch information
falkoschindler authored Aug 28, 2023
2 parents 507314f + f4f012c commit d7fe1c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nicegui import background_tasks, events, ui
from nicegui import __version__, background_tasks, events, ui


class Search:
Expand All @@ -7,7 +7,7 @@ def __init__(self) -> None:
ui.add_head_html(r'''
<script>
async function loadSearchData() {
const response = await fetch("/static/search_index.json");
const response = await fetch("/static/search_index.json?version=''' + __version__ + r'''");
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
Expand Down

0 comments on commit d7fe1c1

Please sign in to comment.