A lot of commercial font sites like myfonts.com do page view tracking with CSS like this:
I'm wondering if this calls have some negative performance issues when loading a site? (blocked loading or rendering of CSS, timeouts when the URL is not accessible or a poor internet connection on mobile...)
I figured it out by myself. I used this code
@import url(http://localhost/wait.php) <?php // wait.php sleep(10) ?>
And the browser waits indeed the 10 seconds before rendering the page. It loads other requests to JS files... asynchron, but the rendering is blocked.
There would be two possible solutions
<style> @import url("//hello.myfonts.net/count/123456"); </style> </body>
This way the browser can render the content and when it's nearly done, it fires the page view count for your commercial fonts.
Btw: Depending on http / https and your location it takes about 50-300ms to fire this page view counts.