Where is standalone css link in theme?

I’m trying to improve load speed using the recommendation from html - How to load CSS Asynchronously - Stack Overflow

I’ve applied it to my_changes > hooks > index > styles.pre.tpl where I call bootstrap.min.css by adding media none and onload to the end of the link as shown below.

This helped reduce the First Content Paintful, Largest Content Paintful and the Total Blocking Time.

I want to apply it to the standalone css stylesheet to see if it will further reduce load times. Do you know which template calls the main stylesheet?

1 Like

I think, you should edit the following file (it combines all included scripts to one file)

app/functions/smarty_plugins/block.scripts.php

Styles are being compiled by the fn_merge_styles function which is called in the app/functions/smarty_plugins/block.styles.php file.

Path to the compiled CSS file is being put into HTML code, in the following code:

        $content .= '<link type="text/css" rel="stylesheet" href="' .
            $filename .
            '?' . fn_get_storage_data('cache_id') .
            '" />';
1 Like