Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

CGI#header

header(options='text/html')

Alias of #http_header

This method is an alias for http_header, when HTML5 tag maker is inactive.

NOTE: use http_header to create HTTP header blocks, this alias is only provided for backwards compatibility.

Using header with the HTML5 tag maker will create a <header> element.