Git Product home page Git Product logo

Comments (8)

mojavelinux avatar mojavelinux commented on July 19, 2024

I think this is definitely a step in the right direction. The cache GitHub Pages is the one thorn of hosting sites with GitHub.

Another option is to add a ?t= query string to the URL. That busts the cache as well.

Keep in mind if we decide this becomes too much of an issue, we could always consider deploying to OpenShift or Heroku.

from docgist.

nawroth avatar nawroth commented on July 19, 2024

It seems AppCache isn't the way to go any more: https://www.fxsitecompat.com/en-US/docs/2015/application-cache-api-has-been-deprecated/

While looking into this, I also found out that the dynamic loading of syntax highlighters breaks in Firefox, so I'm adding all of them to index.html instead.

from docgist.

nawroth avatar nawroth commented on July 19, 2024

Too early to move on to the Service Worker solution, let's close this for now. http://caniuse.com/#feat=serviceworkers

from docgist.

mojavelinux avatar mojavelinux commented on July 19, 2024

@hsablonniere has a really nice coverage of Service Workers (and the deprecation of AppCache) in his talk from Devoxx BE 2015. See https://www.youtube.com/watch?v=SltjVpgTaCo

from docgist.

hsablonniere avatar hsablonniere commented on July 19, 2024

Hi.

I would not say too early. Service Worker embrace progressive enhancement so browser without support will work just fine like before.

What's the use case? Would you want the user to select what's cached? Would you want to try something like last 10 gist avaiblable etc... ?

I would be interested to implement something but we need to discuss a user scenario. And we need a SSL cert (https://letsencrypt.org/ opens its beta on december 3).

from docgist.

nawroth avatar nawroth commented on July 19, 2024

@hsablonniere
The main use case is to make the pages load super fast.
I think it's a very good fit for how AppCache works:

  • Render the page without first checking for updated js/css/html.
  • Make sure the files stay in the cache.
  • Make sure the files are swapped out together in one go.

Next up would be to add a 3.6MB library (https://github.com/mdaines/viz.js/) without affecting the user experience too much.

Storing the last gists visited would be cool!

from docgist.

mojavelinux avatar mojavelinux commented on July 19, 2024

I think it's a very good fit for how AppCache works:

I think this is exactly the use case that @hsablonniere proposes is better done with service workers in his talk. AppCache looks seductive on the surface, but in the end it's a douchebag.

Next up would be to add a 3.6MB library (https://github.com/mdaines/viz.js/) without affecting the user experience too much.

Absolutely. We can leverage the tools of the browser to make this all more seamless and speedy. It just seems to me that service workers are a better fit (or @hsablonniere is just very persuasive).

from docgist.

nawroth avatar nawroth commented on July 19, 2024

AppCache is a tricky beast, yes. And as it's on its way out, service workers are no doubt the way to go now.

from docgist.

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.