fix(messages): add cache-busting to CSS/JS, disable page caching to prevent stale conversation data
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
131e6f0118
commit
c0d9e6f874
@ -205,11 +205,14 @@ def conversations_page():
|
||||
'avatar_url': ('/static/' + current_user.avatar_path) if current_user.avatar_path else None,
|
||||
}
|
||||
|
||||
return render_template(
|
||||
from flask import make_response
|
||||
resp = make_response(render_template(
|
||||
'messages/conversations.html',
|
||||
conversations_json=json.dumps(conversations_data, ensure_ascii=False),
|
||||
current_user_json=json.dumps(user_data, ensure_ascii=False),
|
||||
)
|
||||
))
|
||||
resp.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, max-age=0'
|
||||
return resp
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/quill.snow.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/conversations.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/conversations.css') }}?v=2">
|
||||
<script src="{{ url_for('static', filename='js/vendor/quill.js') }}"></script>
|
||||
<style>
|
||||
footer { display: none !important; }
|
||||
@ -245,7 +245,7 @@ window.__CSRF_TOKEN__ = '{{ csrf_token() }}';
|
||||
// Load conversations.js after data is set
|
||||
(function() {
|
||||
var s = document.createElement('script');
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}';
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}?v=2';
|
||||
document.body.appendChild(s);
|
||||
})();
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user