Page 1 of 1

7. Use 2 Server Push

Posted: Sat Feb 08, 2025 10:11 am
by Rina7RS
If you’re interested in solving this browser caching problem, you’ll first want to take a look at this excellent and detailed comparison of self-hosted vs. third-party hosted fonts .

One solution is to use a tool that downloads the fonts and CSS for you . You just need to select the family and your backward compatibility preferences and the downloadable file is ready, you can unzip it into a directory inside your project and serve the font using CSS in your HTML. If you use WordPress, the OMGF plugin can do all of this for you.

You can also use Easy Fonts , which is a clone of Google algeria mobile database Fonts but adds some CSS utility classes that make it easier to use fonts and facilitate rapid prototyping. Fortunately, this CDN-hosted library also fixes browser caching issues.

Server push is a feature of the 2 protocol that allows a web server to preemptively push files to a browser, in anticipation that the browser will need to request those files soon, before such files are requested.

Therefore, when the server receives a request for a file, it sends that file along with one or more additional files that were configured to be sent along with the file that triggered the server push. This eliminates the round trip time for subsequent requests and makes the resource immediately available to the browser.