Hi, I'm trying to include an extra javascript resource using the "Insert Custom HTML" field in the confluence configuration.
I've included this line in the field:
<script type="text/javascript" src="/includes/js/jquery.sticky.js"></script>
It works well in Chrome / Safari / IExplorer browsers, but when I try to access to Confluence with Firefox I'm getting a very slow response loading the pages.
Looking the Network load when loading the pages I can see that the included resource is loading very slow. Confluence is not caching the .js file and every load takes more than 20 seconds !
Is there any other way to include this resource?
Hi @Víctor Ayllón,
If you know how to develop a simple confluence app the web resource plugin module could help you >> https://developer.atlassian.com/server/framework/atlassian-sdk/web-resource-plugin-module/
If you define a web resource with context alt.general (loaded everywhere except administration screen) and define a resource of type download for your js file there it will be merged in Confluence' batch js/css files.
Best, Tobias
Can you please click on the request and inspect http response headers? I suspect that this resource comes with headers, which disable caching, that's why firefox tries to download it on every page load.
Confluence provides appropriate http caching headers for all resources it is aware about (f.e. registered plugin resources). The problem with custom resources is that Confluence doesn't know if it is appropriate to cache them (f.e. for security or legal reasons).
If jquery.sticky.js resource is served by Confluence (with "Insert Custom HTML" you can add any resources, f.e. hosted somewhere on cdn and not controlled by Confluence), you can add proper http caching rule by overriding urlrevrite.xml in your Confluence (here you can find an example for caching rule)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.