Skip to content
Advertisement

Sending Link Headers for Early Hints in PHP

Cloudflare has introduced Early Hints based on Link Header. I am a little bit confused about how I should send the link header in my PHP script.

As I understand, I should send the Link Header for the links to preconnect

JavaScript

I think we can send HTTP 103 Early Hint via PHP headers

JavaScript

Is it enough?

Advertisement

Answer

No, you actually are required to put nopush at the end, otherwise you’re doing a Push, or set the status code header.

JavaScript

This would work.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement