Cloud Services · Cloud-based Software Delivery

what are reasons js.scripts are not cached inspite of configuring CDN in Azure

Kevin Thomas Cofounder - Freight application

February 9th, 2017

The js.scripts are not getting cached inspite of configuring CDN in azure. What could be the reasons?

Lorne [LION] Seeking new clients - Practical Solutions in Action

February 9th, 2017

Kevin, how are you determining that the .js isn't caching? From the headers?

Kevin Thomas Cofounder - Freight application

February 9th, 2017

The Network panel records information is measured about each network operation on a page, including detailed timing data. the js.script files are not cached - the files are in seconds to load.

Dan Friedman Software engineer by day. Entrepreneur by night.

February 21st, 2017

If you look further at the JS request, you should be able to see the headers. The headers should tell you whether the request wants to be cached. The CDN uses the same cache setting as the server it got the content from. If the headers are correct, then you can check if your browser is purposely avoiding caching to make it easier for developers who are constantly changing code. There should be an option to disable that, if that the case.


"Seconds to load" is also concerning. Are you minifiy-ing and and gzipping your JS? Maybe there are some libraries you could trim out? Maybe you can separate them into separate downloads and only load the scripts you need?