Problem

When page caching is turned on every page is cached with some stylesheet link. So all anonymous users see the same "cached" style everytime they load that page.

Proposed resolution

I propose to add new path route, some 'styleswitcher/active.css', and to add it to <head> instead of real CSS file. This path should somehow redirect to real CSS file depending on each user's active style.

Remaining tasks

  • Styleswitcher block with style links is cached with the same active list item. I propose to move adding 'active' class from PHP to JS.
  • It will be necessary to clear pages cache on each change of styleswitcher configs.

Comments

pingwin4eg’s picture

Title: Cached pages don't respect active style. » Cached pages don't respect active style
Assigned: Unassigned » pingwin4eg
Issue summary: View changes
pingwin4eg’s picture

Assigned: pingwin4eg » Unassigned
Status: Active » Needs review
StatusFileSize
new5.36 KB

  • pingwin4eg committed 8102e87 on 7.x-2.x
    Issue #2258267 by pingwin4eg: Fixed cached pages don't respect active...
pingwin4eg’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.