Tagged Questions

In the Hypertext Transfer Protocol (HTTP), HTTP header fields contain the operating parameters of an HTTP request or response. With the request or response line (first line of message), they form the message header.

learn more… | top users | synonyms

1
vote
0answers
15 views

Apache 404 Issue after upgrading from Mavericks to Yosemites

Good afternoon fellow StachExachangers, Background story: I have recently upgraded my macbook pro from Mavericks to Yosemites, everything went well except my local development environment got ...
1
vote
1answer
74 views

Caching of JS and CSS files – Apache mod_headers doesn’t take effect

As suggested by an answer on SO, I'm trying using a version number on my JS and CSS files so that the browser will only make a request when the JS or CSS version number is changed in my PHP file. To ...
0
votes
1answer
23 views

Does referrer header checking offer any real world security improvement?

At work we use a central portal that provides basic SSO functionality to other applications. In addition to verifying the SSO data sent, all of our existing in-house applications (used by the public) ...
1
vote
1answer
55 views

Did I use the proper way to remove pages from Google Webmaster Tools forever?

I have many pages from one year ago that were deleted and are returning a 404 error code, but two week ago after I cleared the content of my robots.txt, the errors in my Google Webmaster Tools reports ...
1
vote
2answers
99 views

Redirect to an affiliate using PHP or JavaScript redirect?

I was asked to introduce a unified self hosted URL-Shortener/Forwarder/Tracking Service for an website that earns money from affiliates. One example I found was one of the bigger german sites for ...
1
vote
1answer
85 views

Use different .htaccess file based on set header from browser

I want to have the ability to test .htaccess rules before saving them to the main .htaccess file. Is it possible to set a specific request header and have Apache use a set of rules from a different ...
0
votes
1answer
33 views

What is best practice for search engines when a website is under maintenance?

I need around a week to transition a heavily data-driven website from one back end to another. During that time I do plan to attempt to keep some pages live, but they won't all work well or look ...
1
vote
1answer
106 views

How to get keywords from Google HTTP referrer?

Can the http referrer URL from Google be decoded so that I can see the specific keywords? ...
1
vote
1answer
37 views

Can serving a different header code for crawlers and users be considered cloaking?

I have urls that point to pages I don't know yet if exist. Whenever reaching those, I perform a not-so-quick external sources check, and if exists generate the page on the fly. In order to avoid this ...
2
votes
1answer
293 views

Can I set Cache-Control in the .htaccess file for a specific part of a document (just a section of the <body>)

I noticed, by using Google Page Speed Insights, that if I structure my HTML to load the critical, above-the-fold content first, my page will improve performance - and it woks (with now current perf. ...
4
votes
1answer
512 views

Is it necessary to specify content-type in http response header?

Except for the html document, currently all the files (css, javascript and images) served from my web server do not specify the content-type in the http response header. I happen to notice this as I ...
4
votes
2answers
284 views

Why doesn't this web crawler obey requests to stop crawling my pages?

I have a hidden page that verifies internal payments from PayPal. The page has the following in its HTTP headers: X-Robots-Tag: noindex, nofollow But once in a while I see this in the page logs: ...
7
votes
1answer
235 views

Why is “29030400” seconds used as a common value for cache expiration?

I noticed that 29030400 is used very often in the Expires directives for static files. Google recommends to cache this kind of files up to 1 year (1 month at least). I did the math: 29030400 seconds ...
3
votes
1answer
188 views

Should we allow HEAD requests?

Our web application is predominantly read-only. As such we only allow GET requests. However, we regularly get errors in our logs because of user agents making HEAD requests. I've seen these come from ...
1
vote
1answer
152 views

Can a past Expires header value cause a site to not be indexed by Google?

I'm using this: <filesMatch "\.(html|htm|js|css)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, ...
1
vote
1answer
95 views

how do we organize our site's (navigation) pages in Google search? [duplicate]

Is there a HTML technique for organizing my site's main pages in Google (navigation)? Or is it made by a Google's specific tool for creating a result layout like in this picture? Look at the ...
1
vote
1answer
2k views

IP Address headers (Remote_Addr) - When is this header sent by the browser?

I want to know when a browser includes the header - Remote_Addr in the HTTP request. I observed the request sent by the browser on loading stackoverflow.com, in the web console window of Firefox. ...
1
vote
1answer
354 views

Nginx Browser Caching using HTTP Headers outside server/location block

I am having difficulty setting the HTTP expires headers for Nginx outside of specific server (and then location) blocks. What I want is to something like the following: location ~* ...
1
vote
2answers
1k views

Is no cache meta tag bad for performance?

I see many websites, seemingly arbitrarily adding the no cache meta tag on every page. Like this: <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META HTTP-EQUIV="CACHE-CONTROL" ...
5
votes
1answer
451 views

How do Expires headers and cache manifest rules work together?

I find the W3C's official Offline Web Applications specification to be rather vague about how the cache manifest interacts with headers such as ETag, Expires, or Pragma on cached assets. I know that ...
4
votes
1answer
212 views

HTTP Headers caching

I am not totally sure bout HTTP headers, but from what I read its good to have some level of caching on static pages also I am not sure if Transfer Encoding: chunked is a good thing. I was not finding ...
2
votes
1answer
135 views

What's the best HTTP code for dynamically deleted pages?

I've built my own CMS and I'm looking for the best way to handle pages / items deletion. Actually, pages and items were deleted and cannot be restored. But since I have implemented a bin, I don't ...
2
votes
1answer
95 views

How to configure apache2 to just save certain POST requests without even passing them to application?

I'm running Apache in front of glassfish server using BalancerMember. For performance reasons I would like that POST requests on certain endpoint are just saved to a file without passing them to ...
2
votes
1answer
69 views

Why was 303 skipped in HTTP/1.0?

While looking back over HTTP response codes today I noticed that the 301, 302, and 304 response codes were defined in HTTP/1.0 but not the 303 response code. Does anyone know why the number 303 was ...
7
votes
1answer
135 views

Does the SPDY protocol eliminate the need for cookieless domains?

With plain HTTP, cookieless domains are an optimization to avoid unnecessarily sending cookie headers for page resources. However, the SPDY protocol compresses HTTP headers and in some cases ...
2
votes
1answer
2k views

Google Chrome audit: resources are explicitly non-cacheable?

If I run a Google Chrome audit on a site, it lists all CSS, PNG, JPG, JS files and even the main domain (i.e. www.example.com) under the heading: Leverage browser caching The following resources ...
7
votes
3answers
2k views

How to tell the Browser the character encoding of a HTML website regardless of Server Content-Type Header?

I have a HTML page that correctly (the encoding of the physical on disk matches it) announces it's Content-Type: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> ...
0
votes
2answers
1k views

How to extract AdWords keywords from incoming traffic?

I have a landing page in which I need to understand what keywords are coming in from AdWords and then display some information based on this. I am not certain, but I don't believe that this ...
5
votes
3answers
987 views

What does it mean when a User-Agent has another User-Agent inside it?

Basically, sometimes the user-agent will have its normal user-agent displayed, then at the end it will have the "User-Agent: " tag displayed, and right after it another user-agent is shown. Sometimes, ...
5
votes
1answer
3k views

HTTP Header Cache Time: s-maxage and max-age

I am setting up a CDN for my website, I found the following sample for adding to the 'httpd.conf' file, this is used to adjust the cache-time for client and CDN: ExpiresActive On ExpiresByType ...
3
votes
3answers
244 views

PHP Include meta tags

A website I'm currently working on is http://www.troubi.com . Please don't care to look at the source code. If I validate the website through the w3cValidator a lot of errors occur all due to ...
7
votes
2answers
203 views

What should happen when content is deleted?

I am wondering about the standard handling of deleted data links from an application and an SEO perspective. I have an application where users can create content but they can also delete content. ...
3
votes
1answer
539 views

Sitemap file getting double compressed

I have a script that generates my XML sitemap and writes it to the file sitemap.xml.gz - i.e. an XML file, compressed with gzip. This file is definitely written correctly as when I download it via FTP ...
13
votes
1answer
4k views

What is recommended minimum object size for gzip performance benefits?

I'm working on improving page speed display times, and one of the methods is to gzip content from the webserver. Google recommends: Note that gzipping is only beneficial for larger resources. Due ...
13
votes
2answers
3k views

What are the Consequences for using Relative Location Headers?

According to the spec, Location headers used in a redirect require a server name HTTP/1.1 301 Moved Permanently ... Location: http://example.com/foo/baz/bar However, in 2012, most web browsers will ...
14
votes
2answers
10k views

difference between accept and content-type http headers

So the accept header tells the server the mime-type of the resource the browser is looking for. For example, the server can send plain text, html, json, etc. Ok that makes sense. But then I look at ...
0
votes
1answer
1k views

What response headers encourage 304-Not Modified upon reloads?

When looking at the network waterfall in Firebug/Chrome/IE9, I keep seeing "200-OK" instead of "304-Not Modified" for many cache-able files (images, js, css) on this page, for example. I believe it ...
1
vote
1answer
133 views

Site structure changes possibly led to ranking losses

Problem Last monday we changed our german only site from using wordpress to our own multi-lingual rails app. Since then our rankings dropped dramatically. I would like to know if the the recent ...
2
votes
2answers
1k views

How do I modify the HTTP headers?

Google page speed rank demands me to set an expiry date or a maximum age in the HTTP headers, by changing the "Expires" and "Cache-Control: max-age". The site is hosted on a hosting company (not in ...
3
votes
1answer
227 views

Use - or misuse - of ETags

I'm using an application that sets ETags by md5()ing the URL. As I understand it, that's quite insane. In effect, it means that content for a specific URL won't be fetched anew ... ever. Unless a ...
1
vote
0answers
107 views

wordpress header problem / cant add open graph tags [closed]

i am trying to add the facebook open graph tags to my wordpress site woozybmx.com i tried several options but everytime i add them the facebook lint returns something like the tags would be placed ...
3
votes
2answers
2k views

Should 304 Not Modified responses include the “Last Modified” header?

I've been using the most excellent http://redbot.org tool for testing have HTTP headers on my site correct (its custom code in PHP serving dynamic content - wanting to ensure it cached where possible ...
12
votes
1answer
15k views

Headers to prevent 304/If-modified-since/HEAD requests

What headers should I be sending to outright stop all requests to the server after the content has been cached? We have a very high latency server (Sigh, VMWare) so even sending a HEAD request to the ...
6
votes
1answer
3k views

Can I set a variable “Expires” in Amazon S3?

I have a ton of files in Amazon S3 (served via Cloudfront) for which I have added an Expires header of Mon, Jan 1 2024 11:11:11 GMT However, I have recently learned that setting an Expires header ...
4
votes
2answers
634 views

What's the best way to determine users' preferred language?

In determining which language to display content in by default, there are, as far as I know, three basic methods: Examine the Accept headers sent by the browser. Use IP geolocation to determine the ...
1
vote
1answer
314 views

Want to use the HTTP-REFERER of in an HTML page through Javascript

I Want to use the HTTP-REFERER of in an HTML page. Is it possible to do it with a JavaScript included in the page itself?
1
vote
3answers
432 views

302 Moved Temporarily or 301?

HTTP status code checker tool shows HTTP/1.1 302 Moved Temporarily for the home page URL http://someurl.com (just a namesake URL). Also, this URL opens up http://www.someurl.com/general/index. As you ...
13
votes
1answer
249 views

What's the best way to end a Web site?

I have a Web site, built on ASP.NET MVC 3, that will be closing down completely. The domain will still be required for a few months, so during that time I'd like to display a single message on at ...
3
votes
1answer
131 views

Can server break clients' cache settings?

I have disputed a domain name to a cybersquatter that I expect to recover soon. The problem is that the cybersquatter has changed the cache headers and now every user who already visited the site or ...
1
vote
1answer
363 views

How to handle redirects & http status codes at urls where a product becomes unavailable?

I have this use case that happens frequently: Lots of products for sale, periodically a percentage goes out of stock. A user still browses in on the old url, to a location where a product used to ...