Suppose the content editors of your application are preparing content of the application in a Rich Text editor where they are adding links to other pages (internal as well as external). Now you want to control the clicks on those links for various reasons like:
Disclaimer: You might notice that I will write many sentences in philosophical way which could be written otherwise.
I was 11 years old when I first touched a computer. It was Class 7 in a small school in my village and computer was introduced as an additional (optional) subject. I was super excited to know the magical machine that I had seen only on TV before.
It was the year I spent playing ‘Dangerous Dave’ game. At the same time Microsoft launched Windows 95, Bill Gates turned focus on Web, US air force introduced drone, Sony released play station, Sun…
Sometime there is a need to cache the GET requests so that browser doesn’t have to hit server to fetch same data when same service is invoked serially or in parallel. We will implement HttpInterceptor interface of Angular to solve the purpose.
First of all we will create a service that will be used to register the URIs to be cached when we implement the HttpInterceptor.
Next step is to make this service available via providers of the application module
Now, let’s create our class to cache the URIs.
This will cache only GET requests whose URIs…