Git Product home page Git Product logo

Comments (11)

pfitzseb avatar pfitzseb commented on August 16, 2024 1

Pretty sure this is a prefetching thing -- as soon as you mark something as preload the browser can decide when and how often to load a resource (and some browsers are very bad at showing what's actually happening). I wouldn't worry too much about this.

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

(Maybe this is normal - I don't know much about font loading on the web)

from juliamono.

cormullion avatar cormullion commented on August 16, 2024

Hello again!

I wonder if this is caused by the two src urls in the CSS - I wasn't sure which one was going to work on the Friday of JuliaCon (various issues with the CORS headers on different browsers) so in case Netlify couldn't deliver the fonts, perhaps Github could... Perhaps I could remove the Netlify sources and rely on github...

I had hoped that the font would download and display quickly, but if it's waiting for two downloads to complete I've shot myself in the foot... :)

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

I don't think that it's because of the two src: this is a compatibility thing - IE only sees the first src, modern browsers only see the last (conforming to the CSS spec). And the first src point to github.com/..., but both requests go to juliamono.netlify.app.

from juliamono.

cormullion avatar cormullion commented on August 16, 2024

I load just from Netlify now (loading from Github didn't work today for some reason...)

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

Oh I forgot to post it yesterday, but I did the same in Chrome and it only loaded fonts once, so I was going to post that I probably just misread the firefox dev console.

But today I did it again, and it only loads the Regular variant (once), not the other weights. I guess you changed something?

image

And on firefox, it now loads the font 10 times? I checked the headers, and it's 10 separate requests:

image

from juliamono.

cormullion avatar cormullion commented on August 16, 2024

Aye, I changed it this morning - but I couldn't get any downloads from github.com at all, so just deleted those and relied on the netlify paths. I'm going to research it some more... (It occurred to me that free Netlify sites like this have download caps so perhaps there's that as well to worry about! :))

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

I load just from Netlify now (loading from Github didn't work today for some reason...)

This could be an HTTP headers problem with GitHub. I would recommend using a CDN that delivers from GitHub releases:

https://cdn.jsdelivr.net/gh/cormullion/[email protected]/webfonts/JuliaMono-Regular.woff2

They look at the file extension (.woff2) and make sure that the correct headers are set (just like netlify does). It should also faster across the globe. It also works in China, and their uptime should be better than github.

(I don't know the details about any of this, I just read it on their website 😇)

from juliamono.

cormullion avatar cormullion commented on August 16, 2024

That's cool - did you have to register or anything or is it a URL anyone can use?

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

Nope they forward all of github! Once someone requests a file for the first time, they cache it internally.

They can also do JS (and CSS?) minification by changing the filename from .js to .min.js.

from juliamono.

fonsp avatar fonsp commented on August 16, 2024

Thanks!

from juliamono.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.