A war flag, also known as a military flag, battle flag, or standard, is a variant of a national flag for use by a country's military forces when on land. The nautical equivalent is a naval ensign. Under the strictest sense of the term, few countries today currently have proper war flags, most preferring to use instead their state flag or standard national flag for this purpose.

Field signs were used in early warfare at least since the Bronze Age. The word 'standard' itself is from an Old Frankish term for a field sign (not necessarily a flag).

The use of flags as field signs apparently emerges in Asia, during the Iron Age, possibly in either China or India. in Achaemenid Persia, each army division had its own standard, and "all officers had banners over their tents".

Use of simple flags as military ensigns becomes common during the medieval period, developing in parallel with heraldry as a complement to the heraldic device shown on shields. The maritime flag also develops in the medieval period. The medieval Japanese Sashimono carried by foot-soldiers are a parallel development.

Some medieval free cities or communes did not have coats of arms, and used war flags that were not derived from a coat of arms. Thus, the city of Lucerne used a blue-white flag as a field sign from the mid 13th century, without deriving it from a heraldic shield design.

More Info: en.wikipedia.org