Skip to content

Commit

Permalink
Fix the ajax reload caching the responses
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed Nov 17, 2023
1 parent ad0845c commit 8a60840
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions assets/ajax-reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
const xhr = new XMLHttpRequest();

xhr.open('GET', window.location.href);
xhr.setRequestHeader('Cache-Control', 'no-cache');
xhr.setRequestHeader('Pragma', 'no-cache');
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Haste-Ajax-Reload', event.name);

Expand Down
1 change: 0 additions & 1 deletion public/ajax-reload.1bd492e2.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/ajax-reload.a2e92af1.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"entrypoints": {
"ajax-reload": {
"js": [
"/bundles/codefoghaste/ajax-reload.1bd492e2.js"
"/bundles/codefoghaste/ajax-reload.a2e92af1.js"
]
},
"dca-ajax-operations": {
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ajax-reload.js": "/bundles/codefoghaste/ajax-reload.1bd492e2.js",
"ajax-reload.js": "/bundles/codefoghaste/ajax-reload.a2e92af1.js",
"dca-ajax-operations.js": "/bundles/codefoghaste/dca-ajax-operations.f1fc43fe.js",
"dca-date-range-filter.css": "/bundles/codefoghaste/dca-date-range-filter.d51e272a.css",
"ajax-reload.1bd492e2.js.map": "/bundles/codefoghaste/ajax-reload.1bd492e2.js.map",
"ajax-reload.a2e92af1.js.map": "/bundles/codefoghaste/ajax-reload.a2e92af1.js.map",
"dca-ajax-operations.f1fc43fe.js.map": "/bundles/codefoghaste/dca-ajax-operations.f1fc43fe.js.map"
}

0 comments on commit 8a60840

Please sign in to comment.