Real refresh the web page

When an iframe/html/aspx page been refreshed,  the browser won’t refresh completely instead it may just refresh from cache as the url is exactly the same as before. To achieve the real refresh, can added a “Date.Now.Millisecond” into query string, and this will change the url every time and let browser do a fresh real refresh.


        Dim cs As ClientScriptManager = p.ClientScript()
        Dim t As Type = sendertype
        Dim s As String = "window.parent.document.getElementById('LeftFrame').src='dlist1.aspx?" & "time=" & Date.Now.Millisecond & "&did=1';" & _
                          "window.parent.document.getElementById('RightFrame').src='" + urlstr + "'; "
        'Dim s As String = "window.open('dlist1.aspx?debateid=1', 'LeftFrame'); "
        cs.RegisterStartupScript(t, "D frame refresh", s, True)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s