Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 22.214.171.124 release ready!
Owner and Founder. Opencart
Caching is done on server side to enhance the speed of the server as active data is stored in caches, a relatively smaller and faster memory, and made available to customer whenever request hits. The validity of the data is based upon its expiration time. But sometimes this cache on server ends up giving you stale response for your android Application which in any case is wrong. So how can we control this behavior? We can do this using Http header for controlling cache i.e. Cache-Control.
The Http header Cache-Control give us everything we need, we just have to use it efficiently based on the issues we are getting.
We can set many values to the Cache-Control header. There are many variants of this header such as
public: It lets server know that the response is not specific to any single user.
private: Opposite of public. It sets the response is specific to a single customer e.g. single browser.
max-age=[seconds]: It sets the maximum time upto which the response is treated as fresh. A 0 as seconds means that the response just expires right away.
no-cache: It tells server to do not cache the current request.
and many more.
You can set multiple of then in one go as
Just use according to you situation and you will definitely get results.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.