richie icon indicating copy to clipboard operation
richie copied to clipboard

DNS-prefetch media domain

Open igobranco opened this issue 2 years ago • 0 comments

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.

Use dns-prefetch and preconnect on header to increase Richie site performance for the media static URL.

DNS-prefetch is an attempt to resolve domain names before resources get requested. This could be a file loaded later or link target a user tries to follow. Reference: https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch

Example:

Describe the solution you'd like Custom code that generate the dns-prefetch link for the media static domain.

Describe alternatives you've considered Or, use a django middleware to generate it automatically - https://gist.github.com/kravietz/718e4882bcec27cb9e1a I think this 2nd solution have performance problem and the dns-prefetch for media static domain would be good enough.

Do you want to work on it through a Pull Request? yes

igobranco avatar Jul 27 '22 21:07 igobranco