Skip to content
A Magento 2 extension, which allows you to add preconnect, prefetch or preload resource hints to your Magento 2 storeview's head.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Block
Observer/Framework/View/Layout
etc
.gitignore
CODE_OF_CONDUCT.md
LICENSE
README.md
composer.json
package.json
registration.php

README.md

Resource Hints for Magento 2

Overview

Add <link rel='preconnect'>, <link rel='prefetch'> or <link rel='preload'> resource hints to Magento 2's head.

Features

  • Tweak your Magento 2 store's performance by adding custom preconnect, prefetch and preload headers.
  • Easily configurable at default, website and store view level (incl. sort order).

Installation

Using Composer

Installation using Composer is easy and recommended. From a terminal, just run:

composer require dan0sz/resource-hints-magento2

Manually

If you can't or dont want to use Composer, you can download the master-branch of this repository and copy the contents to app/code/Dan0sz/ResourceHints.

After installation

Developer Mode

  • Run bin/magento setup:upgrade
  • Done!

Production Mode

  • Run bin/magento setup:upgrade
  • Run bin/magento setup:di:compile
  • Run bin/magento setup:static-content:deploy [locales e.g. en_US nl_NL]
  • Done!

Configuration

After installation a new tab is added to Stores > Configuration > General > Web called Resource Hints.

You can’t perform that action at this time.