Map is not loading on Web App for the first time after clearing the cache

1003
3
07-16-2021 07:02 AM
bobypan8089
New Contributor

I have created a web application where I am creating polygons on the map.
The whole mapping system is working fine. But there is an issue when I clear the browser cache.

 

When I am clear the cache, that I am not able to load the map for the first time. I have to refresh the page after the map will load.

 

Here, I have attached the snapshot of the map

 

Thanks

1. Map is not loaded1. Map is not loaded2. Map is loaded after refreshing the page2. Map is loaded after refreshing the page

0 Kudos
3 Replies
AndyGup
Esri Regular Contributor

Hi @bobypan8089 do you have a sample app or codepen that reproduces the issue?

0 Kudos
bobypan8089
New Contributor

Hi @AndyGup 

Here  I have sent the sample of my code.
Here I have used multiple API(required API). these are the API which I want for my working functionality but these are not used in sample code, I have just added for you reference that which API I have used.

Also, this issue is only occurring in the Live server, but this issue is not producing the local server.

ESRI Mapping Sample Code 

0 Kudos
AndyGup
Esri Regular Contributor

Based on what I see in the codepen, this isn't an issue with the ArcGIS API for JavaScript, something in your custom library injection code isn't working right. We recommend using esri-loader to lazy load the ArcGIS JS API: https://github.com/esri/esri-loader for exactly these types of use cases.

0 Kudos