开发者

Publishing ASP.NET website

开发者 https://www.devze.com 2023-03-16 12:33 出处:网络
I have a few pages in an asp.net application. I made a change to a javascript function (instead of window.close I changed it to an alert) and published to IIS. Letterally from this:

I have a few pages in an asp.net application.

I made a change to a javascript function (instead of window.close I changed it to an alert) and published to IIS. Letterally from this:

function ShowHelp()
{window.close();}

<li><a onclick="ShowHelp()">Contents</a></li> 

T开发者_运维技巧o this:

function ShowHelp()
{alert("Help files to be added");}

<li><a onclick="ShowHelp()">Contents</a></li> 

When I hit F5 I can see the changes. I get the alert message and it's exactly what I want (for now). But when I publish, and try to view the website from my other box, my browser closes when clicking on the link. It's like the browser cached the window and is looking at the cached version.

I'd really like it to always check the server for the newest version. How can I do this in ASP?

Thanks,

Jason


You can append a timestamp parameter (milliseconds) to your request URL.

Since the timestamp is always different, this is seen to the browser as a new request, and therefore, it will always fetch the latest version from the server.

0

精彩评论

暂无评论...
验证码 换一张
取 消