Images with remote source not in cache Nativescript vuejs

Viewed 26

I use Nativescript with vuejs (NS 8.2 & VueJs 2.6). The problem I have is the following :

The images fetched on a remote url, seem to be refreshed each time I navigate on the component. This is not very user friendly :-( when I arrive on the Home I have white blocks and they take a bit of time to be loaded (slow internet). It looks like my pictures are not in cache... Is there anything I can do to solve the problem ?

Here is a part of the code :

  <ListView height="850" for="item in list_items" @itemTap="onFlickTap" >
      <v-template> 
         <GridLayout  
          height="280" 
          class="bg-secondary"
          rows="*, auto, auto"
          columns="*"
          margin="5 10"
          padding="0"
        >
          <image    row="0" margin="0" height="200" stretch="aspectFill" :src="'https://my_remote_web_site.Com/upload/pictures/small_'+item.picture" />
          <label
            row="1"
            margin="10 10 0 10"
            fontWeight="700"
            class="text-primary"
            fontSize="18"
            :text="item.title"
          /> 
        </GridLayout>
      </v-template>
    </ListView>  

*One precision I test my app on phone android with usb

Thanks a lot !

0 Answers
Related