Ad

What Is The Fastest Way To Consume An JSON?

- 1 answer

I call a JSON with 7000 objects (I use the JS filter direct in the GET's scope and keep the response in a variable) by GET's axios and as you can see from the image it's taking too long, affecting SEO :(

It's 3 seconds delay!

I've done something:

I packed JSON with gzip

I used minify in the JSON*

I put cookies for 1 year on htacess

I put the direct filter on the GET call

Things I want to do but I am unsure and I need your help:

Use Algolia

Split JSON into parts

Can anyone help me please i can't find the answer is i have been looking for this for months :(((

Ad

Answer

You can implement pagination on your backend to send JSON in smaller peaces or open an stream to read the JSON string and parse it as it's comes

Ad
source: stackoverflow.com
Ad