Skip to content
  • Andrew White's avatar
    c55e32ec
    Add `config.action_view.preload_links_header` option · c55e32ec
    Andrew White authored
    PR #39939 added support for the `Link` header being generated
    automatically when using `stylesheet_link_tag` and
    `javascript_include_tag`. However not everything should be
    preloaded, e.g. a link to a legacy IE stylesheet has no need to be
    preloaded because IE doesn't support the header and in some browsers it
    will trigger the preload even though it's not used since it's inside an
    IE conditional comment. This leads to increased bandwith costs and
    slower application performance.
    
    To allow more flexibility for sites that may have complex needs for the
    `Link` header this commit adds a configuration option that disables it
    completely and leaves it up to the application to decide how to handle
    generating a `Link` header.
    
    (cherry picked from commit 200083c2)
    c55e32ec
    Add `config.action_view.preload_links_header` option
    Andrew White authored
    PR #39939 added support for the `Link` header being generated
    automatically when using `stylesheet_link_tag` and
    `javascript_include_tag`. However not everything should be
    preloaded, e.g. a link to a legacy IE stylesheet has no need to be
    preloaded because IE doesn't support the header and in some browsers it
    will trigger the preload even though it's not used since it's inside an
    IE conditional comment. This leads to increased bandwith costs and
    slower application performance.
    
    To allow more flexibility for sites that may have complex needs for the
    `Link` header this commit adds a configuration option that disables it
    completely and leaves it up to the application to decide how to handle
    generating a `Link` header.
    
    (cherry picked from commit 200083c2)
Loading