Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

problem with edge web browser

edited February 2017 in Mongoose Binary

I am having an issue with creating a dynamic web site.

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" value="Save Changes" / >
< / form >

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

Now I want the web browser 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 I 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?

Comments

  • SergeySergey Dublin, Ireland

    Sorry, I didn't get the problem.
    Could you rephrase please?

  • You can use the Edge devtools to inspect if the request is sent or not.
    Open the network tab and then hit submit.

    https://docs.microsoft.com/en-us/microsoft-edge/f12-devtools-guide

  • 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.

  • SergeySergey Dublin, Ireland

    @Imre you need to take a look at javascript code that fetches the data from the server and populates the input. The HTML you've shown is irrelevant.

  • 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.

  • And the answer is:

    < meta content="text/html; charset=utf-8" http-equiv="content-type" >
    < 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" / >

Sign In or Register to comment.