在Visual Studio 2010中,“自动启动调试”选项始终会将日期时间字符串附加到URL(In Visual Studio 2010 “Start debugging” option auto

编程入门 行业动态 更新时间:2024-10-28 17:24:57
在Visual Studio 2010中,“自动启动调试”选项始终会将日期时间字符串附加到URL(In Visual Studio 2010 “Start debugging” option automatically always append Date time string to URL)

假设我想使用F5“开始调试”选项打开页面foo.htm。 是否有一些可以添加到VS的宏可以打开页面并始终自动将任意参数附加到查询字符串:

foo.htm?bar=Date().getTime().toString()

在VS中打开时,这会发生在任何html页面上。

或者,是否有一个设置说VS,“始终从磁盘读取html页面 - 从未使用过缓存版本”。

Let's say I want to open page foo.htm using F5 "Start debugging" option. Is there some macro that can be added to VS that would open the page and always automatically append an arbitrary parameter to the query string:

foo.htm?bar=Date().getTime().toString()

This would happen to any html page when opened in VS.

Alternatively, is there a setting that says to VS, "always read the html page from disk -- never used a cached version".

最满意答案

在html页面中添加以下行。 它将确保您始终从磁盘读取html页面。

<head> <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" /> </head>

Append below lines in your html page. It would ensure that you always read the html page from disk.

<head> <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" /> </head>

更多推荐

VS,html,page,foo,页面,电脑培训,计算机培训,IT培训"/> <meta name="descripti

本文发布于:2023-07-17 07:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1141325.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:会将   字符串   自动启动   选项   日期

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!