View Revisions: Issue #25969

Summary 0025969: bug_report_page is forced to be cached
Revision 2019-12-16 07:31 by dregad
Description

After MantisBT master 97b745dc

Now bug_report_page is being cached by the browser.
The wrong behavior i see is:
Once in the report page, i change the active project to report in a different project.

  • before: the page was reloaded with the new project fields
  • after: the page does not change, as is loaded from browser cache.

The changes to http_caching_headers, that affects this scenario is that:

  • before: header "Expires" sets date to "now"
  • after: header "Expires" sets date to "now"+10 days

The report page has an explicit $g_allow_browser_cache = 1;
that means that it's overriding the default caching behavior (by default it's to not allow caching)
originated in this 2014 commit: MantisBT master d508493a

I suspect that previous behavior was not actually correct, since setting the "Expires" date to "now" wasn't working as expected to allow caching.
And force the caching of the page is not a good solution to the problem (0016570), especially now that modern browsers already loads a cached page after using the "back" functionality.

Should we remove those $g_allow_browser_cache = 1; ?

EDIT [dregad] replace github URLs with internal, source-integration references

Revision 2019-08-05 18:41 by cproensa
Description

After
https://github.com/mantisbt/mantisbt/commit/97b745dc102323c312ca27b6fcb8f838c3e50b8f

Now bug_report_page is being cached by the browser.
The wrong behavior i see is:
Once in the report page, i change the active project to report in a different project.

  • before: the page was reloaded with the new project fields
  • after: the page does not change, as is loaded from browser cache.

The changes to http_caching_headers, that affects this scenario is that:

  • before: header "Expires" sets date to "now"
  • after: header "Expires" sets date to "now"+10 days

The report page has an explicit $g_allow_browser_cache = 1;
that means that it's overriding the default caching behavior (by default it's to not allow caching)
originated in this 2014 commit: https://github.com/mantisbt/mantisbt/commit/d508493ab34190b7647b8b644548a565c0fc664e

I suspect that previous behavior was not actually correct, since setting the "Expires" date to "now" wasn't working as expected to allow caching.
And force the caching of the page is not a good solution to the problem (0016570), especially now that modern browsers already loads a cached page after using the "back" functionality.

Should we remove those $g_allow_browser_cache = 1; ?