etag

Conditional request not honored in Includes

血红的双手。 提交于 2019-12-25 16:42:39
问题 I'm trying to dynamically concatenate a bunch of javascript files into a single file using the INCLUDE filter. The include.shtml.js test script is <!--#include virtual="/static/script2.js" --> <!--#include virtual="/static/script1.js" --> The virtual server config has both SSIETag and SSILastModified set to On for that file <VirtualHost *:80> ServerName test.dkt ServerAlias test.com UseCanonicalName Off ErrorLog logs/test.dkt-error_log CustomLog logs/test.dkt-access_log combined LogLevel info

Where should I insert “etags -R .” in makefile?

十年热恋 提交于 2019-12-25 02:44:10
问题 I am writing a compiler in Ocaml... I am just wondering at which stage it is most convenient to generate the tags ... I guess it should not be after the compilation of all files, because it is possible that the compilation fails, and it still makes sense to get tags . Where do you usually put etags in makefile? 回答1: I put tag generation on a separate target. When I want to generate an executable, I don't care about tags. When I'm working on the source code, I might want to regenerate the tags

How ETags are generated and configured?

≡放荡痞女 提交于 2019-12-24 21:17:03
问题 I recently came through the concept of ETag HTTP header. (this) But I still have a problem that for a particular HTTP resource who is responsible to generate ETags? In other words, it is actual application, container (Ex:Tomcat), Web Server/Load balancer (Ex: Apache/Nginx)? Can anyone please help? 回答1: As with most aspects of the HTTP specification, the responsibility ultimately lies with whoever is providing the resource. Of course, it's often that case that we use tools—servers, load

Implementing HTTP ETags in a web server

浪尽此生 提交于 2019-12-24 17:28:21
问题 I'm currently looking into the possibility of implementing ETags in a Web Server, to support only the conditional GET. The Web Server is written in C++ and runs only on a Windows OS. After doing some research I have a few questions...Do servers that implement this feature generally cache the ETag GUID for a particular file? I'm not too familiar with the Apache code base, but I was able to locate the ap_condition_if_none_match function but, it isn't entirely clear to me how they check the GUID

Restlet client resource “not modified” condition

亡梦爱人 提交于 2019-12-23 23:00:24
问题 I've got a Restlet based application, and I'm trying to use Restlet client resources to test certain parts of it. Since upgrading from Restlet 2.2.3 to 2.3.4, my ETag verification tests have started failing. Here's how I was adding the header in the old version: Series<Header> headers = (Series<Header>) currentClientResource.getRequest().getAttributes().get("org.restlet.http.headers"); if (headers == null) { headers = new Series<Header>(Header.class); } headers.add("If-None-Match", "\"" +

什么是页面缓存

微笑、不失礼 提交于 2019-12-23 21:16:39
对于网站建设来说,页面缓存是安装在网站服务器之前的缓存服务器,用于卸载对于服务器上的静态和动态对象的请求。在 建站系统 或建站软件中页面缓存还有其它常见名称,如反向代理缓存,反向代理服务器和反向代理。经过慎重考虑,最后还是采用了页面缓存这个术语,因为在建站系统中代理程序还会负责负载平衡或SSL加速,而我们只想专注于缓存服务器对可扩展性的影响。 页面缓存会处理部分或所有请求,直到它存储的页面或数据过期,或服务器收到的请求需要没有被缓存的数据。请求失败叫做缓存未命中,原因可能是缓存满了,没有空间为最新的请求缓存数据,也可能是缓存未满,但请求的频率较低或最近重启过。未命中缓存的请求会被直接传递给web server,并且用该请求回答并填充缓存,从而替换缓存中最近很少使用的数据,或者在空白处写入数据。 在这个过程中,有三个关键点。 第一,应该在web server处理请求之前实现页面缓存,这样建站系统就会得到很大的可扩展性。生成动态内容的web server工作量会大大减少,因为计算过的结果在合适的时间被恰当的缓存了。提供静态内容的web server不需要查询的内容,可以少用一些缓存空间。因此,对于静态网站来说,缓存的作用就不那么明显了,因为输出内容本身就没有太大的计算量和负担。 第二,建站系统中要实现缓存必须使用正确的http头,确保对内容和查询结果进行最大化的缓存,并且 网站建设

Browser cache files not getting updated after a new deployment in jboss server for a web application

雨燕双飞 提交于 2019-12-23 21:14:53
问题 I am using jboss Server 7.1.1 for deploying a java web application. For js, css, font files the browser cache is not getting updated with new changes. Every time we insist the clients to clear cache in their browsers to get the new changes to effect. is there any configuration which i can configure, so that when a new code is deployed i can guide all the request to be provided with the updated file ? by googling on this topic i find that, we can write custom methods to set e-tag value. is

前端性能优化 —— 添加Expires头与Cache-control区别

非 Y 不嫁゛ 提交于 2019-12-23 17:37:14
要:添加Expires头能有效的利用浏览器的缓存能力来改善页面的性能,能在后续的页面中有效避免很多不必要的Http请求,WEB服务器使用Expires头来告诉Web客户端它可以使用一个组件的当前副本,直到指定的时间为止。 例如:Expires:Thu,15 Apr 2010 20:00:00 GMT; 他告诉浏览器缓存有效性持续到2010年4月15日为止,在这个时间之内相同的请求使用缓存,这个时间之外使用http请求。 Cathe-Control:max-age=315360000 Expires有一个非常大的缺陷,它使用一个固定的时间,要求服务器与客户端的时钟保持严格的同步,并且这一天到来后,服务器还得重新设定新的时间。 HTTP1.1引入了 Cathe-Control,它使用max-age指定组件被缓存多久, 从请求开始在max-age时间内浏览器使用缓存,之外的使用请求,这样就可以消除Expires的限制, 如果对浏览器兼容性要求很高的话,可以两个都使用。 这里对http 304 状态结合max-age做一个总结: 浏览器初次访问服务器---------------服务器返回200状态 如下图: 浏览器再次请求服务器时,浏览器会先判断max-age,如果到期则直接请求服务器,否则直接从缓存中取, 服务器收到请求后,判断文件是否被修改过,若是则直接返回200,否则返回304

Are there any HttpCahce client libraries for Java?

夙愿已清 提交于 2019-12-23 03:48:12
问题 I have already asked about this for android, but I will broaden the question to include java in general... Are there any libraries for implementing a Http cache? I want to download my images more efficiently, honoring If-Modified-Since, etags, etc. I'm sure there is a library to which one can pass the url of the image and let the lib handle all redirects or fetch the locally stored content in a cache? BR // Jonas 回答1: Take a look at this and also this blog post. Maybe they help? Also look at

sails.js: how to disable etags

廉价感情. 提交于 2019-12-22 17:42:23
问题 I read this not very new post about disabling some things in sails.js. Specifically what I would like to try out is the disabling of etags. Does anyone know how to disable that in sails.js (0.11.0)? 回答1: You could disable it in the bootstap.js file: // config/bootstrap.js module.exports.bootstrap = function(cb) { // Add this line to access to the Express app and disable etags sails.hooks.http.app.disable('etag'); // It's very important to trigger this callback method when you are finished //