RapidAPI Profile picture
Feb 16 β€’ 14 tweets β€’ 2 min read
An HTTP cache is crucial for making your website fast.

Let's discuss everything about HTTP cache in a bit more detail.

Thread πŸ§΅πŸ‘‡πŸ»
Most websites you visit fetch data from the backend to display it on the web page.

Continuous calls to the server can make your website slow and hence worst User Experience.
This is where cache comes into the picture.

Cache is a technique using which the browser can store the resources in the local storage, reducing the number of round trips to the server.
Cache reduces the latency and number of calls, resulting in a fast and performance-optimized website.
There are two broadly divided categories of cache.

1. Shared cache
2. Private cache
Shared cache, as the term suggests, can be used by multiple users.

Whereas, private access is dedicated and accessible by the single user only.
Private cache exists in your browser. You can check by following the steps below.

Inspect > Select Application from the top navbar > Check Cache on the left tree. Browser cache memory.
The shared cache is accessible to multiple users. For example, Internet Service Provider serves resources to multiple users via shared cache.
You can handle the entire cache mechanism using the `Cache-Control` HTTP header.

It holds instructions for both request and response.
For example, if you want to revalidate the cached response each time with the origin server, use

`Cache-Control: no-cache`
You can also define the lifecycle of cache data using the `max-age` directive.

For example,

`Cache-Control: max-age=100`

The cached response will be considered fresh for 100 seconds.
When a client makes a GET request, the request first goes through a cache and then to the server.

The freshness of data is decided by `Cache-Control: max-age=X` and `age=Y` headers.

Data is fresh if `max-age` is greater than `age` else stale.
Refer to the attached infographic to understand what the cache workflow looks like. πŸ‘‡πŸ» Caching in API calls.
With that being said, this is pretty much it for this thread.

Follow @Rapid_API for more exclusive content. πŸ™πŸ’™

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with RapidAPI

RapidAPI Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Rapid_API

Feb 17
Free API Development courses.

Learn more about APIs and web development in general by creating excellent projects.

Thread πŸ§΅πŸ‘‡πŸ»
1️⃣ Build and sell your own API

Make a profitable API from scratch and sell it on the RapidAPI Hub.

πŸ”— RapidAPI.com/courses/build-…
2️⃣ Build and Deploy a Google Maps Travel Companion Application

A great tutorial on building and deploying a Google Maps Travel Companion App using a free API available on RapidAPI.

πŸ”— RapidAPI.com/courses/build-…
Read 7 tweets
Feb 17
How to handle CORS in your Node.js application.

Thread πŸ§΅πŸ‘‡πŸ»
CORS is quite annoying for developers. But not that as it sounds.

Let's see how we can handle it effectively in our Node.js application.
You can check this thread if you're not familiar with CORS.

Read 8 tweets
Feb 16
Top ten Text Analysis APIs.

Thread πŸ§΅πŸ‘‡πŸ»
1️⃣ Sentiment Analysis

Enter a string to check the positive or negative tone.

RapidAPI.com/twinword/api/s…
2️⃣ Text-Processing

This API provides sentiment analysis, stemming and lemmatization, part-of-speech tagging and chunking, phrase extraction, and named entity recognition.

RapidAPI.com/japerk/api/tex…
Read 12 tweets
Feb 15
What exactly is an HTTP Cookie.

Thread πŸ§΅πŸ‘‡πŸ»
Have you ever imagined how you stay logged in even after you close the tab?

Or how do items stay in your cart when you refresh or close a tab?

The answer is cookies.
HTTP cookies, also known as web cookies or browser cookies, are nothing but a piece of data that the server sends to the browser.
Read 16 tweets
Feb 14
Top ten Finance APIs you can use in your next project.

A Thread πŸ§΅πŸ‘‡πŸ»
1️⃣ Alpha Vantage

- The simplest and most effective way to receive stock, ETF, forex, technical indicators, and cryptocurrency data.

πŸ”— RapidAPI.com/alphavantage/a…
2️⃣ Currency Converter

- Provides exchange rates based on the official bank's data.

πŸ”— RapidAPI.com/natkapral/api/…
Read 11 tweets
Feb 11
A complete Introduction to Fetch API.

Thread πŸ§΅πŸ‘‡πŸ»
Fetch is a web API that provides an interface to fetch resources across the networks.

For making a request, we have the `fetch()` method.
The fetch method is entirely based on `promises` that can be resolved to the request's response.

Before moving further, let's talk a little bit about Promises. πŸ‘‡πŸ»
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(