OMGFautomagicallycachestheGoogleFontsusedbyyourtheme/pluginslocally.Noconfiguration(orbrains)required!
DescriptionHowcouldusingfontsviaGoogle'sservicepossiblyrunafoulofGDPR?Thefactofthematteristhat,whenafontisrequestedbytheuser'sbrowser,theirIPisloggedbyGoogleandusedforanalytics.—Lifehacker
LeverageBrowserCache,MinimizeDNSrequestsandserveyourGoogleFontsina100%GDPRcompliantwaywithOMGF!
OMGFiswrittenwithperformanceanduser-friendlinessinmind.ItusestheGoogleFontsHelperAPItoautomaticallycachethefontsyourthemeandpluginsusetominimizeDNSrequestsandspeedupyourWordPresswebsite.
HowDoesItWork?Afterinstallingtheplugin,OMGFrunssilentlyinthebackgroundandcapturesanyrequestsmadetofonts.googleapis.comorfonts.gstatic.com.Whenawebpageisfirstloaded,itreroutestheserequeststoitsownDownloadAPIandcopiesthefontsovertoyourserver.ThenitgeneratesastylesheetforyourfontsincludingEOT,TTF,WOFFandWOFF2formatstoguaranteemaximumcrossbrowsercompatibility!
Whenthefontsaredownloadedandthestylesheetisgenerated,itrewriteseveryURLpointingtofonts.googleapis.comorfonts.gstatic.comtothelocallyhostedvariant.
Pleasekeepinmindthat,althoughItrytomaketheconfigurationofthispluginaseasyaspossible,theconceptoflocallyhostingafileoroptimizingGoogleFontsforPagespeedInsightsorGTMetrixhasproventobeconfusingforsomepeople.Ifyou'renotsureofwhatyourdoing,pleaseconsultaSEOexpertorWebdevelopertohelpyouwiththeconfigurationofthispluginorhiremetodoitforyou.
FeaturesAutomaticallyreplaceregistered/enqueuedGoogleFontsinwp_head()withlocalcopies,Automaticallyremoveregistered/enqueuedGoogleFontsfromwp_head(),ManageOptimizedGoogleFonts,Preloadabovethefoldfonts,Don'tloadcertainfontsorentirestylesheets.Leveragethefont-display(swap)option.FeaturesinthePROversionEverythinginthefreeversion,plus:
SpecifyaFallbackFontStackforeveryGoogleFont,toreduceCumulativeLayoutShift,Automaticallyremove/replaceallGoogleFontsthroughouttheentiredocument/page,AlsosupportsWebFontLoader(webfont.js),EarlyAccessGoogleFontsandrequestsinstylesheetsusing@importand@font-facestatements.AutomaticallygeneratedifferentstylesheetsforpageswithdifferentGoogleFontsconfigurations.CombineallGoogleFontsstylesheets(requestedbyyourthemeand/orplugins)intoonefile,DeduplicateGoogleFontsstylesheets,Definefiletypestoincludeinstylesheet(WOFF,WOFF2,EOT,TTF,SVG),Reduceloadingtimeandpagesize,byforcingtheusedsubset(s)forallGoogleFontsrequests,RemoveResourceHints(preload,preconnect,dns-prefetch)pointingtofonts.googleapis.comorfonts.gstatic.com,ModifysrcattributeforfontsinstylesheetusingtheFontsSourceURLoptiontofullyintegratewithyourconfiguration,UsethistoservefontsandthestylesheetsfromyourCDN,orToservefontsfromanalternativepath(e.g.whenyou'reusingSecuritythroughObscuritypluginslikeWPHide,etc.),orAnythingyoulike!ProperhandlingforAMPpages(FallbacktoorremoveGoogleFonts).Documentation|PurchaseOMGFPro
InstallationUsingGITFromyourterminal,cdtoyourpluginsdirectory(usuallywp-content/plugins)Runthefollowingcommand:gitclonehttps://github.com/Dan0sz/host-webfonts-locally.githost-webfonts-localFromtheWordpressRepositoryFromyourWordPressadministratorarea,gotoPlugins>AddNewSearchfor'DaanvandenBergh'Clickthe'Install'buttonnexttoOMGF|HostGoogleFontsLocallyClick'Activate'FrequentlyAskedQuestionsVisittheFAQatWordpress.org
SupportForSupportQueries,checkouttheSupportForumatWordpress.org
ChangelogVisittheChangelogatWordpress.org
评论