It may be a matter of taste, but after writing an entire HTML page in code I would enjoy adding some logic to the program
. If flash = false is the default state, you can just write it before the string comparisons, e.g.
flash = false;
... // just set the PIN value, leave flash in the default state
else if(readString.indexOf("?flashing") >0)
flash = true;
In order to make the logic more readable I would put the code for the HTML output in a function of its own. It is just presentation and it's probably going to grow in size, but it gets in the middle of the most important function in the loop.