1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem updating form fields in edge web browser

Discussion in 'HTML & Website Design' started by Imre Leber, Feb 21, 2017.

  1. #1
    I am having an issue with creating a dynamic web site. I am using a non standard web server (mongoose).

    When I create a web page with a form field:

    <form method="post" enctype="application/x-www-form-urlencoded">
    <input type="text" />
    <input type="submit" id="cfg_lan_apply" value="Save Changes" style="display: inline-block; margin-left: 1px; font-size: 1em; font-weight: bold;">
    </form>

    And I let this post to the web server I can update the database on the server.

    Now I want the web server to fetch the pages from the web server so that I can dynamically generate new content, meaning fill out the text field with information:

    <input type="text" value="new info"/>

    Now this works on firefox and chrome. But if I use the microsoft edge browser the pages are not updated and the web browser never asks the pages from the web server.

    So if enter some data in the field, post it to the server, and then refresh the page, the edge web browser shows the old data in the form fields, without updating to the new value.

    Is there some way to force the edge web browser to get the web pages from the web browser?
     
    Imre Leber, Feb 21, 2017 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    How is this "new info" stored on the server? Database? Written to file? How exactly is this updating anything?
     
    PoPSiCLe, Feb 21, 2017 IP
  3. Imre Leber

    Imre Leber Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I have a HTML web site. That is filled in with dynamic data.

    It contains HTML pages with contents:

    < html >
    < head >
    < / head>
    < body>
    The temperature is now: < input type="text" value="33" / > degrees celcius.
    < / body >
    < / html >

    The intention is obviously to get the temperature each time the web site is refreshed.

    On chrome and firefox, each time the page is refreshed the new temperature is shown.

    On edge, it shows a page that is filled out with some value it had before, taken from the cache, even if I turn off the cache.

    The question is thus, is there some way to instruct the edge web browser not to take the page from the cache, but to send a request to the web server to retreive the current temperature.
     
    Imre Leber, Feb 22, 2017 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    First - why do you have an <input> with a set value to display the temperature? How is the dynamic data retrieved from the server? How is it input into the page?
     
    PoPSiCLe, Feb 22, 2017 IP
  5. Imre Leber

    Imre Leber Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    It might be important to note that this is an embedded web server and that the intention is not to have to run too much software on the embedded device (no PHP, ASP.NET, JSP). So the temperature is read in C and the HTML page is generated by substituting the current value in the HTML page.

    The HTML page is then served as if the HTML page would be installed in a file system.

    I think it might have something to do with the HTTP headers, or it might need some tags at the very beginning, or in the head section, for microsoft web browsers.
     
    Last edited: Feb 22, 2017
    Imre Leber, Feb 22, 2017 IP
  6. Imre Leber

    Imre Leber Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    And the answer is:

    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />
     
    Imre Leber, Feb 23, 2017 IP