ASP.NET +配置实体标签 [英] ASP.NET + Configuring Entity Tags

查看:123
本文介绍了ASP.NET +配置实体标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了我的工作将整理ASP.NET Web应用程序倒是。为了帮助这一点,我一直使用YSlow的。有了这个工具,我发现我没有正确配置我的网页组件的实体标签。不幸的是,我不知道如何做到这一点。

I have developed an ASP.NET web application that I'm working on putting the finishing touches on. To assist with this, I have been using YSlow. With this tool, I have discovered that I have not properly configured the entity tags of the components on my pages. Unfortunately, I have no idea how to do this.

如何在组件配置实体标签在ASP.NET页面内?

How do I configure entity tags on components within an ASP.NET page?

下面是YSlow的这样说:

Here is what YSlow says:

有28组件与配置错误的ETag
的http://本地主机:81 /资源/ page.js
HTTP://本地主机:81 /资源/图像/ bg.png
的http://本地主机:81 /资源/图像/ app.png
...

There are 28 components with misconfigured ETags http://localhost:81/resources/page.js http://localhost:81/resources/images/bg.png http://localhost:81/resources/images/app.png ...

实体标记(ETag的)是一种机制,网络服务器和浏览器使用,以确定在浏览器的缓存组件是否匹配一个源服务器上。由于ETag的使用特性使其独特的托管网站的特定服务器通常构造,当浏览器从一台服务器获取原始组件,后来试图验证在不同的服务器上该组件的标签将不匹配。

Entity tags (ETags) are a mechanism web servers and the browser use to determine whether a component in the browser's cache matches one on the origin server. Since ETags are typically constructed using attributes that make them unique to a specific server hosting a site, the tags will not match when a browser gets the original component from one server and later tries to validate that component on a different server.

感谢您!

推荐答案

这是不是真的,因为ETag的一个ASP.NET的问题(至少是默认)是由IIS响应静态文件的请求发出的。你给的几个例子都是静态文件(JS,PNG等)。

This is not really an ASP.NET issue since ETags (at least by default) are emitted by IIS in response to requests for static files. The few examples you've given are all static files (JS, PNG, etc).

究竟为什么你的ETag是配置错误是很难说,但是,在一个猜测,我会说你主持你的网站网页农场(多个Web塞雷尔语),每个服务器生成的流量的ETag,因此使它们比有用的少。

Exactly why your ETags are misconfigured is difficult to say but, at a guess, I'd say you're hosting your site in a web farm (more than one web serer) and each server is generating its ow ETag and thus making them less than useful.

在这里看到更多的一些信息: http://developer.yahoo .NET /博客/存档/ 2007/07 / high_performanc_11.html

See here for some more info: http://developer.yahoo.net/blog/archives/2007/07/high_performanc_11.html

这篇关于ASP.NET +配置实体标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆