its good, from the moment you get the If-Modified-Sinceresource in the browser, and you decide whether you allow it as it is.
I like to say what you think here. It seems to you that you are not setting this header, so you probably will not get it in the browser.
To do this actual work you need to add this line
context.Response.AddHeader("If-Modified-Since", LastModifledOfImage.ToString());
or how you send the current date-time:
context.Response.AddHeader("If-Modified-Since", DateTime.UtcNow.ToString());
when sending the image. I see what you are usingSetLastModified , but that means the title is Last-Modifiednot the one you are checking.
, , , If-Modified-Since , .