Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Nick C

    (@modernnerd)

    Thanks for the request, QROkes!

    The query strings are used so that the font can be updated with new icons without modifying the filename. Even though using query strings can prevent proxy caching, most browsers should fetch the font file the first time the page loads, then load it from cache on subsequent page loads.

    At the moment, the simplest way to disable them would be to edit the file at wp-content/plugins/simple-social-icons/css/style.css and remove the query strings directly in that file.

    Thread Starter Anonymous User

    (@anonymized-14169293)

    Thanks for your answer, Nick.
    I think is not a good practice use query strings because it affect the site performance, as you said before, it prevent to be cacheable, so every time it should be loaded (although is just a small size file).
    It’s not like everyday you add new icons, so it’s not a hard job change the filename.

    I think is not a good practice use query strings because it affect the site performance, as you said before, it prevent to be cacheable, so every time it should be loaded (although is just a small size file).

    Query strings are still a popular way to version assets, and they don’t normally cause major issues.

    The query strings this plugin uses should not prevent the fontello font from being cached in most cases – the vast majority of browsers will load fontello on the first visit, but use a cached copy on subsequent page visits.

    To test this yourself, you can:

    1. Visit a site in Chrome that uses Simple Social Icons, such as https://www.genesisframework.com/.

    2. Open the Network tab, search for Fontello, then clear your cache and refresh the page. You’ll see that the site loads the font the first time with a status of 200 and a size of 5.9KB: https://d.pr/i/qRlG

    3. Refresh the page. You’ll see that the resource size now says “from cache” to indicate that the file was served from a local cache and not requested from the server this time, despite the query string. https://d.pr/i/14SqF

    The only time the query string may cause an issue is if:

    a. A (typically quite old) proxy server ignores the query string and caches an old copy of the font, then serves it instead of the newly updated one.

    b. You’re using a CDN that’s configured to ignore query strings (not generally the default). In this case, you may also end up serving a stale version of the font if the CDN isn’t refreshed after a plugin update.

    If you’re not experiencing either of these issues, the query string should pose no problem. If you’re running into those issues and this starts to affect other plugin users too, I’d be very happy to pass on your recommendation to switch to file name versioning instead of query string versioning.

    I hope that explanation proves useful, and many thanks again for the feedback!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fontello Query String’ is closed to new replies.