This issue has been created
There is 1 update.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-220fd940-80c6-4042-9071-2f7581ba5fc4 LLMAI-216 Open

The chat script is cached by browsers for a month and its URL carries no version

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-df1b7bb2-0cc6-41bd-bea3-733d8dabbe0e Paul Pantiru created this issue on 16/Oct/26 11:24
 
Summary: The chat script is cached by browsers for a month and its URL carries no version
Issue Type: cid:jira-generated-image-avatar-220fd940-80c6-4042-9071-2f7581ba5fc4 Bug
Affects Versions: 0.10
Assignee: Unassigned
Created: 16/Oct/26 11:24
Priority: cid:jira-generated-image-static-minor-c2121efb-36ec-4f6b-b18f-fdfe1f59573f Minor
Reporter: Paul Pantiru
Description:

AI.Code.Javascript (models-ui) is loaded as the RequireJS module xwiki-llm through the UIX parameter path=$xwiki.getURL("AI.Code.Javascript", "jsx", "language=$xcontext.language") (Javascript.xml about lines 1813-1814). The JSX object has cache=long, so the response is served with Expires one month ahead and Cache-Control: public, and the URL has no version part. The platform's own skin extension links add docVersion=<page version> precisely to avoid this (AbstractDocumentSkinExtensionPlugin.getDocumentSkinExtensionURL), and the CKEditor module uses the installed extension version as a v parameter (CKEditor.EditSheet line ~1354).

Observed live: after the reinstall, a browser kept running the previous chat code until the cache entry was refreshed by hand; so every browser that used the chat before an upgrade keeps the old code for up to a month. The same line also uses the deprecated $xcontext.language (Velocity logs Deprecated usage of getter [Context.getLanguage] on every page render; use $xcontext.locale).

 
 

1 update

 
cid:jira-generated-image-avatar-df1b7bb2-0cc6-41bd-bea3-733d8dabbe0e Changes by Paul Pantiru on 16/Oct/26 11:24
 
Assignee: Paul Pantiru