Force Browser to Refresh

Discussion in 'ASP.NET / ASP.NET Core' started by dbireporter, Jan 8, 2011.

  1. I have created a web page (ASP.net 3.5 with VB code) with image and a FileUpload objects.

    After a picture file is uploaded and the image URL changed, the VB code loads the page again and the newly loaded picture appears in the image object. So far so good.

    Problem is, if I load another page, then load the page with the image again, the old picture is displayed.

    If I click the browser Refresh, the page displays the new, correct picture.

    Does anyone know how to force the browser to refresh the page from the server, and not display the previously loaded page?
     
  2. I found an answer to my problem.

    In Internet Explorer you must prevent browser caching.

    Click Tools\Internet Options.
    In the General tab, under “Browsing History” click Settings.
    Then under “Check for newer versions of stored pages:” check the option “ Every time I visit the webpage”
     

Share This Page