Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
software.hifis.net
software.hifis.net
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 31
    • Issues 31
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • HIFIS
  • software.hifis.netsoftware.hifis.net
  • Issues
  • #52

Closed
Open
Opened Oct 25, 2019 by Huste, Tobias (FWCC) - 111645@frust45Owner

Optimize browser caching of Assets

In our webserver configuration we will activate caching. Currently, this might lead to situations, where the website and the distributed CSS or JS don't fit together anymore. This might lead to weird behavior. Typically this issue is solved by adding some hash to the filename of the generated CSS. Example: hifis.dh45js.css. Like this, the browser definitely knows, when to load a new file.

In Jekyll there exist multiple solutions. As a beginning, I would suggest to go for the most easy to implement approach by adding the generation timestamp.

<link rel="stylesheet" href="hifis.css?{{site.time | date: '%s'}}">

Like this, the browser knows, when to load new assets. An ideal solution would be to add a hash to the file. This would probably require a plugin. One could have a look at https://github.com/envygeeks/jekyll-assets.

Edited Oct 25, 2019 by Huste, Tobias (FWCC) - 111645
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: hifis/software.hifis.net#52

Privacy | Imprint | Support | Status