The software either knows, or does not know, if there are unsaved changes.
That is a yes/no question.
So it is either monitoring whether the document is "dirty" (programming jargon for "has unsaved changes") or it is not.
OMITTING THE ARTICLE
Leaving this page will discard unsaved changes.
USING "ANY" INSTEAD OF THE ARTICLE
Leaving this page will discard any unsaved changes.
USING THE DEFINITE ARTICLE Leaving this page will discard the unsaved changes.
To use the definite article the implies that there are in fact unsaved changes to be concerned about, and so there had better be, or the user can lose faith in the software.
So a software developer should use the only if the software is actually monitoring the document for changes (and the document is "dirty").
To use any will never be inaccurate, since it implies that there may be such unsaved changes.
But to use any explicitly reminds the user every time the warning is displayed that the software is not "intelligent" enough to detect if there are such unsaved changes.
So the people in the sales department would advise against any .
Why remind the user of a shortcoming?
When neither the definite article the nor any is used, the warning becomes a general truth (unsaved changes do not get saved if you exit now), which leaves it up to the user to decide if there are such changes to be concerned about.
This is little different than using any ; but it lacks the explicit reminder of the software's shortcoming.
This is the version the sales department would opt for when the software lacked the intelligence to track the document's state.
ell.stackexchange.com/users/10264/Tᴚoɯɐuo
The sentence is fine as-is, although adding the word "the" would not make it incorrect.
You could also add the word "any"; I think that would sound better than "the": Leaving this page will discard any unsaved changes.
It's hard to say if the software engineers were trying to be deliberately terse, or if they simply liked their shorter version better.
Maybe they strive to write short messages, much like headline writers do, to save space on mobile devices.
A trickier question is, "When is it okay to omit the article, and when must it be left in?"
After all, I wouldn't have asked that tricky question as:
When is it okay to omit article?
In that simple question, I'd say you could use the definite or the indefinitie article, but not the null article.
You can find more about the null article at this question .
ell.stackexchange.com/users/113/J.R.
Discard the unsaved changes implies that there actually are some changes that have not been saved.
Discard unsaved changes could mean that the message is displayed whether or not there actually are unsaved changes, but if there are they will be discarded.
If the software correctly detects whether or not there are changes before displaying the message, the unsaved changes might reinforce the sense that the software 'understands' the situation, and increase the chance that the user will think before clicking OK - rather than assuming the message is something automatic that is displayed whether or not there are actually any changes they might want to save.
You might even choose to say Leaving this page will discard the unsaved changes to your document -
but there is a delicate tradeoff to be made between ensuring your messages mean what you want, and making them too wordy.
This question might also be suitable for http://ux.stackexchange.com .
ell.stackexchange.com/users/10140/nekomatic
Leaving this page will discard unsaved changes.
My guess is that it would not be a crime to omit the ; it would be similar to the practice of article omission used in newspaper headlines and in picture captions.
As a sidenote, I guess there are some usability guidelines in the software industry that address the topic of "exit messages".
Maybe it would be better to rephrase the sentence, like You have unsaved changes.
Do you really want to leave this page?
or in some other way.
ell.stackexchange.com/users/2127/CowperKettle
I would actually rephrase this message to address the user more directly (which is always a good thing to do, and better for localization): If you leave this page, any unsaved changes will be discarded.
Do you want to continue?
[Yes]
[No] --Ron
ell.stackexchange.com/users/15749/Ron
"Leaving this page will discard unsaved changes" has the same meaning as "Leaving this page will discard any unsaved changes" in that it doesn't assume there are any unsaved changes, but if there are it will discard them.
In this case you know that the user has unsaved changes
so I would say, "You have unsaved changes.
Leaving this page will discard your changes."
ell.stackexchange.com/users/15701/Nick B
In my software, if user edits some content of a document and clicks close icon without saving the changes he made (i.e. without clicking the save icon first), the text of message that I display to the user is as follows:   Leaving this page will discard unsaved changes.   Should I use ‘the unsaved changes’ instead of simple ‘unsaved changes’? Does this sentence look correct?
Should I use 'the' in 'Leaving this page will discard {the} unsaved changes'?
ell.stackexchange.com
<articles>
ell.stackexchange.com/questions/47274
ell.stackexchange.com/users/4293/Ayse
Discard unsaved changes  does not mean that there actually are any unsaved changes, but  if there are  they will be discarded.  Discard the unsaved changes  implies that there  actually are  some changes that have not been saved. The' implies that there are unsaved changes. Both versions work.
Both versions work. The' implies that there are unsaved changes.