• kingthrillgore
    link
    fedilink
    171 year ago

    I ended up using a static site generator for my personal site because I fucking hate JS and frameworks and WebComponents. The front page is 646 KB and it loads in 4 seconds. I’d love for it to be 1 second or less, but the fonts are a factor.

    And I shrunk the shit out of that background too with pngcrush so miss me with that.

    • Phoenixz
      link
      fedilink
      101 year ago

      Honestly, 4 seconds is really slow, especially with static HTML. I built my first companies’ site myself, it includes a video on the front page and jquery, is built by PHP, and on descent Internet connections the front page will load in slightly over a second, other pages dip under that.

      There are loads of tweaks you can make to -any- site, and total amount of bytes really isn’t the only speed factor here.

    • @TCB13@lemmy.world
      link
      fedilink
      English
      7
      edit-2
      1 year ago

      My front page is 613KB with Wordpress. Moral of the story, you don’t have to use a static website generator to have light things.

        • @TCB13@lemmy.world
          link
          fedilink
          11 year ago

          And how do you plan to manage your posts, database etc. and render stuff in those? You still need some backend solution like Wordpress, you can use vue as a frontend library for it… or vanilla JS, or jQuery…

            • @TCB13@lemmy.world
              link
              fedilink
              English
              11 year ago

              So… you are aware that FastAPI and Flask will always be significantly slower than Wordpress… because Python, always running processes etc.?

              You’re building a simple website / blog just use Wordpress, it will output most of the pages into plan simple and fast HTML, then add a few pieces of vanilla JS or Vue (if you’re into that) to make things “fluffier”. Why bother with constant XHR requests when you’re just serving simple text pages?

              With Wordpress you’ll also get all the management, roles, permissions, backend for “free” and you can always, like sane people, cache the output of the most visited pages. Wordpress also provides a RESTful API if required.

    • @TopRamenBinLaden@sh.itjust.works
      link
      fedilink
      English
      7
      edit-2
      1 year ago

      Not that you’d want to because you hate JS and web components and all that, and there’s nothing wrong with your website, but NextJS supports Static Site generation.

      So, JS and frameworks and webcomponents can get the job done for simple stuff nowadays. My portfolio page has a load time of 631 ms using the SSG built into NextJS, and its really similar to your website.

    • @flying_sheep@lemmy.ml
      link
      fedilink
      41 year ago

      I have a pixel 6 and notice some lag in scrolling. Could it be that you don’t use srcsets but instead huge screenshots no matter the device screen?

    • Venia Silente
      link
      fedilink
      English
      31 year ago

      , but the fonts are a factor.

      I’m not sure if the possibility is there depending on your use case (eg.: you are exporting the fonts) nor if the cost of doing it would be worth the shot, but you can send minified versions variants of fonts, too.

    • bufalo1973
      link
      fedilink
      31 year ago

      The fonts can be loaded from another file that ends in the cache, lowering load time next time.