Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsForAPI + jQuery = TTFB 500 ms #18

Open
denisshevchenko opened this issue Apr 18, 2017 · 0 comments
Open

jsForAPI + jQuery = TTFB 500 ms #18

denisshevchenko opened this issue Apr 18, 2017 · 0 comments

Comments

@denisshevchenko
Copy link

denisshevchenko commented Apr 18, 2017

Hi!

I use jsForAPI for jQuery-based AJAX call:

apiAJAXCall :: Text
apiAJAXCall = jsForAPI api' jquery

where api' is an API from one single endpoint. After that I embed this text into <script>-tag in the index page (it's important detail, see below).

It works perfectly, but I see that the first request is too slow: TTFB is ~500 ms (on localhost!). Important: it's not AJAX-request for this endpoint, it's a request to index page! Such a big delay occurs only for the first request to the index page (after app reload), all other requests are very fast. How can I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant