The 'Add Head' filter is enabled by specifying:
pagespeed EnableFilters add_head;
in the configuration file, but it is also enabled automatically by several other filters, including combine_heads, move_css_to_head, and add_instrumentation.
The 'Add Head' filter is very simple: it adds a head to the document if it encounters a <body> tag before finding a <head> tag.
For example, if the HTML document looks like this:
<html> <body> <div class="blue yellow big bold"> Hello, world! </div> </body> </html>
Then PageSpeed will rewrite it into:
<html> <head> </head> <body> <div class="blue yellow big bold"> Hello, world! </div> </body> </html>
This filter exists primarily to ensure that other filters have a place to insert new tags that needs to be in the head, or that trigger on the closing-tag for a head to perform some other action.
This filter is considered minimal risk.