0

This is a code, generated from my .NET 3.5 application :

<input type="text" 
 rel="0,00 €"
 id="ctl00_ContentPlaceBody_ImpostaCompravenditaImmobili1_txtRenditaCatastale"
 value="0,00 €"    
 name="ctl00$ContentPlaceBody$ImpostaCompravenditaImmobili1$txtRenditaCatastale">

Now, when I load it, and through Firebug (but this doesn't matter really, with whatever debugger you use you can do this) I add/delete (for example) disabled="", and I refresh the page (by hitting F5), on the server side it stores this value. And in the page I get after the refresh, the value has been stored in the (I believe) context View of the page.

Is it a bug? Normal behavior? I found it really bizarre!

Oleks
  • 31,955
  • 11
  • 77
  • 132
markzzz
  • 47,390
  • 120
  • 299
  • 507

1 Answers1

1

This behavior doesn't depend on FireBug or a similar plugin. It depends on a browser.

I was able to reproduce this with my Firefox 10.0.1 (I also was able to reproduce this with earlier versions of FF): I added extra chars to my textbox, then pressed F5 and the text in that text box wasn't changed. But after doing a Ctrl - F5 the value in my textbox resetted to the default value.

A simple test shows that FF set the Cache-Control: max-age=0 header when F5 is pressed.

Doing a Ctrl - F5 sent these headers: Pragma: no-cache and Cache-Control: no-cache.

I also was able to find a workaround for this on the server side by using:

Response.Cache.SetNoStore();

This will add Cache-Control: no-store to the response headers (it means do not store any part of either this request or any response to it.).

For a breakdown of other browsers behaviour, check out this answer.

Is it a bug? Normal behavior?

When I faced this first time it was really unexpected to me too.

Community
  • 1
  • 1
Oleks
  • 31,955
  • 11
  • 77
  • 132