Skip to content

Commit

Permalink
Make sure we don't get 304 when reloading documents
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Dec 4, 2024
1 parent 1766bf1 commit c9dbe1e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@
});
}
async function reloadHtmlDocument() {
let currentUrl = window.location.href;
let currentUrl = cacheBustedUrl(window.location.href);
const response = await fetch(currentUrl);
const fetchedHTML = await response.text();
const parser = new DOMParser();
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/javascript/hotwire_spark/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function cacheBustedUrl(urlString) {
}

export async function reloadHtmlDocument() {
let currentUrl = window.location.href
let currentUrl = cacheBustedUrl(window.location.href)
const response = await fetch(currentUrl)
const fetchedHTML = await response.text()
const parser = new DOMParser()
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/app/assets/stylesheets/base.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body {
color: blue;
color: red;
}

0 comments on commit c9dbe1e

Please sign in to comment.