View Single Post
  #1  
Old 05-06-2017, 10:16 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default https://fonts.googleapis.com/***

The various versions of this link used within XC5, will always cause issues with leverage browser caching / static - mainly because, being provided by Google yep, there's no caching allowed. This has been briefly touched on before, but in a different forum query that was specifically related to the Google Analytics Module. This last item in this post (from that thread) is the most relevant : https://forum.x-cart.com/showpost.php?p=402988&postcount=7

It's actually specified within 6 different XC5 Core files (2 x php / 1 x twig / 3 x html) in our own, current XC5 based store, but we're pretty sure that NONE of these, other than the two shown below possibly, have any association with the module above. FWIW, If we run our Dev Store with that module disabled, this font is stalled called up. Your own store(s) may be different...
PHP Code:
.../classes/XLite/View/CommonResources.php
.../var/run/classes/XLite/View/CommonResourcesAbstract.php 
So our two questions are:

Are there any specific, technical reasons WHY this font still being used? e.g. No Google based module. like the already mentioned Google Analytics Module will work properly without the Core inclusion of this font... or something like this?

If so, has anybody actually, genuinely tried this at XC?

On a different domain / non-XC5 setup that we have, we removed all links to Google's "...you can't cache our precious content, otherwise we'll take our ball home..." and replaced them with alternative settings, with no detrimental effect, but it's not XC5, so this discovery may not be relevant here....

In most of the current XC 5 Core code, it's presented this way:
Code:
'url' => '//fonts.googleapis.com/css?family=' . urlencode('Open Sans:300italic,400italic,600italic,700italic,400,300,600,700') . '&subset=' . urlencode('latin,cyrillic,latin-ext'),

So to summarise, if there's NO absolute technical reason for still using it, could it be replaced with an alternative (cacheable) font with effect from XC 5.3.3.* onwards? Because XC5.* is getting better and better (XC 5.3.2.9 is like chalk and cheese compared to XC 5.1.* ) so it seems a big limiting factor, to be forever following Google's own, convenient 'rules'.
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote