Git Product home page Git Product logo

Comments (5)

leiwan5 avatar leiwan5 commented on July 20, 2024

sorry, it's chrome 10, not firefox

from now.

sridatta avatar sridatta commented on July 20, 2024

Thanks for letting us know. It's added to the list of bugs to fix.

from now.

dvv avatar dvv commented on July 20, 2024

Frankly, there should be an option to relay serving static files to an external app (nginx?) or a middleware layer -- to say, to the code which is capable of setting etags,cache-control and so on.

For setting SERVER and PORT is in essense the same as the rendering a template, right?

from now.

ericz avatar ericz commented on July 20, 2024

now.js content-type 'text/plain' has been changed to 'text/javascript'

This issue is now fixed.

@dvv, we set SERVER and PORT on first request of now.js, then we cache it since it will never change in the lifetime of the service instance.
If you prefer to serve it statically using nginx etc. , simply download http://localhost:port/socket.io/socket.io.js and http://localhost:port/nowjs/now.js. Since that now.js will have the server and port already filled out, you can serve that static file without issue.

from now.

dvv avatar dvv commented on July 20, 2024

This still leaves unnecessary checks for certain URLs ('/nowjs/now.js') in request handlers in setups like mine where dynamic handlers stand before static ones. I mostly meant elimination of these checks. The same in socket-io itself about checking whether url is /socket.io/socket.io.js which is not switchable out and just eats ticks...

from now.

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.