You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/06/13 23:04:16 UTC
[sling-org-apache-sling-app-cms] 01/02: Fixing an issue where the
reload content is cached in browser
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch dklco/conf-cleanup
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit 1a406273e27c727b0fae9c708d47b71b82063d42
Author: Dan Klco <dk...@apache.org>
AuthorDate: Wed Jun 12 22:10:49 2019 -0500
Fixing an issue where the reload content is cached in browser
---
ui/src/main/frontend/src/js/cms.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index 0a8355b..6130912 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -109,6 +109,11 @@
containers.forEach(function (container) {
var request = new XMLHttpRequest(),
link = container.dataset.path;
+ if (link.indexOf('?') === -1) {
+ link += '?tstamp=' + Date.now();
+ } else {
+ link += '&tstamp=' + Date.now();
+ }
request.open('GET', link, true);
request.onload = function () {
var tmp = document.createElement('div');