Project

General

Profile

Actions

Defect #17770

open

very simple fix: that causes many sites to break, and much confusion - incorrect use of .js suffix

Added by dj jones about 10 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Redmine by default, does something bad: it uses (in certain places only) the .js file extension for files that contain user content. ie files that should not be cached.

A small change should be made, to stop using the .js extension in these specific places.

Because:
Many Redmine users, configure Apache/Nginx to cache-in-the-browser all static files, such as .css and .js.
And the obvious config: is to look for files name *.js or *.css.

But those users will experience problems, that they then post here about (see list at the end).
It is a hard thing to diagnose -because the connection between the apache.nginx change and these specific, local problems: is not obvious.

It happens alot, so fixing this will save many people pain.

When people add a Nginx or Apache config to cache all .js files - at first everything seems to work... but then a day or more later they will notice a problem: it will happen on one of a few specific places

a) Click 'edit' on an existing journal in an issue

(the js file created is eg 24174.js where 24174 is the journal number: the AJAX call is:

- GET https://redmine.xyz.com/journals/edit/24174.js

b) Uploading a file to an Issue

Having selected the file in the Browse button: this file is called, (which contains the image file being sent to the server)

- POST https://redmine.xyz.com/uploads.js?attachment_id=1&filename=my-file-to-upload.png

List of Tickets on redmine.org that are definitely to this issue

Can't upload image #13564
Nginx Configuration (with Phusion Passenger) to set Expiration Headers RE: Nginx Configuration (with Phusion Passenger) to set E...
Unable to edit issue journal messages in Redmine 2.3.1 #14150
Unable to edit notes/answers in issues RE: Unable to edit notes/answers in issues


Related issues

Related to Redmine - Defect #15560: RJS leakingClosed

Actions
Has duplicate Redmine - Defect #27560: RJS is messing up Nginx proxy for static filesClosed

Actions
Actions #1

Updated by dj jones about 10 years ago

Added Wiki page to explain the Browser caching complexities in Redmine
BrowserCaching

Actions #2

Updated by Toshi MARUYAMA about 10 years ago

  • Description updated (diff)
Actions #3

Updated by Toshi MARUYAMA almost 7 years ago

  • Description updated (diff)
Actions #4

Updated by Toshi MARUYAMA almost 7 years ago

Actions #5

Updated by Toshi MARUYAMA almost 7 years ago

  • Has duplicate Defect #27560: RJS is messing up Nginx proxy for static files added
Actions

Also available in: Atom PDF