Giter VIP home page Giter VIP logo

Comments (3)

elmasse avatar elmasse commented on June 5, 2024

@laurendorman

The main purpose for nextein is to create a static site. The deployed result should be just static content. I believe that each provider such as zeit or netlify would have a way to set the required HTTP headers for that matter.

Now, in case you want to deploy a non exported version, which in theory you can do it, maybe I can add some hooks (like copying the example from next example and enable SSR cache by using a config option). I'm just not sure what are the possible issues with deploying a non exported version since the custom server implemented in nextein is purely made to support dev mode and HMR.

Some references from Netlify:
https://www.netlify.com/blog/2017/02/23/better-living-through-caching/
https://www.netlify.com/docs/headers-and-basic-auth/#custom-headers

from nextein.

laurendorman avatar laurendorman commented on June 5, 2024

@elmasse, I am using Zeit for hosting and it looks like the only way to do this properly is with a custom server, with the use of a CDN, or possibly writing some middleware. I will look into my options to see what makes the most sense for this project.

Thanks for the response and clarity!

Cheers.

from nextein.

elmasse avatar elmasse commented on June 5, 2024

@laurendorman if you are deploying a static site in now.sh all assets (except the index.html) are cached. Check this screenshot from the nextein.now.sh deploy:

screen shot 2018-02-19 at 6 22 04 pm

This includes not only the assets in the static folder such as images but also all .js files generated by next.

The SSR cache in this case is useless since this is a static deploy and there is no server generating content.

Hope this helps!

from nextein.

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.