Does desktop app download files in a note on demand?

Does desktop app download files in a note on demand?

If I have a note with a file and open it in window desktop app,  does the app download the file only if I click the file?

What about pdf preview?  Does it  retrieve the page from the server or download entire pdf?