When using Cache-Control and Expires header so that a page won't expire in 10 years:
Cache-Control: max-age=315360000
Expires: Sun, 19 Jul 2020 18:06:32 GMT
will using line 1 have identical result as line 2?
<link href="/public/doc.css?v=128" ... >
<link href="/public/doc_v128.css" ... >
I was thinking maybe some browser will take...
I realize that this cannot be modified according to previous posts but if this is set in the actual header; would it not be necessary to include it in the httpwebrequest header as well.
Also the actual header includes X-Requested-With:XMLHTTPRequest so I realize this may be a dumb question but how do you include this in the httpwebreques...
With most browsers this is not a problem, but with a combination of ISP proxies and Safari browsers on iPhone/iPad the page is rendered as text/plain, so the JavaScript on the page won't run.
Can I set the HTTP header for this specific page manually somehow
or
Is there a workaround on MOSS/IIS?
I could put rules onto our load bal...
I am writing a web service that accepts only json, and also outputs only json.
So I need to return the appropriate status code if any other format is requested.
It appears that I have two choices:
406
415
It would be great if someone could enlighten me as to the semantics of the two codes.
...
Hi,
Let's say I have a website called (example.com) which will have a php file (example.com/call.php).
call.php will have a post method that will post to the website exampleOne.com/login.php with the right parameters. exampleOne.com will return a header with a cookie that will confirm the authentication of the user, how do I obtain the ...
I was reading http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
and trying to figure out how to continue a file download.
For example, suppose a file is of length 100 bytes and I have all the 100 bytes. However, I don't know what the expected file size should be, so I ask for the file and specify a Range header that looks ...
I have the following code in a PHP script:
<?php
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')))
{
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
// Other statements follow here
echo 'Hello there ...'
instead of echoing the message, I want to redirect the...
All,
I have a PHP application that seems to generate the following headers in an array. I wish to remove these headers, so I can set new ones like the one for a pdf download.
array(2) {
[0]=>
string(23) "X-Powered-By: PHP/5.3.1"
[1]=>
string(23) "Content-type: text/html"
}
How do I do this, as this doesn't seem to work:
var_...
I am building an AJAX application that uses both HTTP Content and HTTP Header to send and receive data. Is there a point where the data received from the HTTP Header won't be read by the browser because it is too big ? If yes, what is the limit and is it the same behaviour in all the browser ?
I know that theoretically there is no limit...
Hi folks,
I'm using Firefox 3.6.8 for these tests.
I'm setting a cookie within the response headers of my web app using:
Set-Cookie: session=7878dfdsfjsdf89sd89f8df9
This does not seem to override the session Cookie.
When a request is performed instead Firefox even sends duplicate cookies:
Cookie: session=7d75cd8f55895cbccb0d31e...
Hi,
I hope you could help me with the following question:
A user clicks a hyperlink in a page. Server A handles the request and redirects the client to a URL on Server B (more specifically I am using the Response.Redirect method in .NET on server A).
I have been asked to restrict access to Server B to redirects originating from Server...
The Cache-Control HTTP/1.1 header can specify max-age as well as whether the cache content can be public or private, indicating whether intermediate cache can cache the content.
For example, Ruby on Rails's expires_in() defaults to using Cache-Control: private
What is the risk of making it public? If it is public, which extra places c...
When an http header is sent by a browser because the url is included in another page is it any different than when it is called by browsing to that page. for example if I have myjavascript.php am I gonna be able to tell if its being viewed by someone browsing to it rather than it being included in a tag?
...
I need to send the following header with my httpRequest:
'X-ABC-Reco-Token'=>'a0d15977';
I have the following code:
$array = array("X-ABC-Reco-Token"=>$token);
$this->request->setHeaders($array);
echo var_dump($this->request->getHeaders());
however, this is the output I get:
"X-Abc-Reco-Token"=...
my index.php page code is-
<?php
if(!$_COOKIE['authorized'] == 1) {
header("Location: login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Photo Website</title>
<script src="js/j...
Say I make an HTTP request to: foosite.com but the port I actually send the request to is 6103 but I DON'T put that port in the "Host" header for example:
GET /barpage HTTP/1.1
Host: foosite.com
Method: GET
Should the server then recognize that I'm trying to talk to it on port 6103? Or since it was omitted in the request am I gambling...
How many characters can the value of the X-Forwarded-For (XFF) HTTP header value be?
Example is:
X-Forwarded-For: client1, proxy1, proxy2
...
Hi,
for a web application that is currently under development, I'm using Orbited to serve the static files. This works fine for .js and .css files, but it seems to have problems with displaying svg images that are embedded in html. Regardless of whether I call the svg file directly in the browser or calling the html which embeds the svg...
I'm writing a simple crawler, and ideally to save bandwidth, I'd only like to download the text and links on the page. Can I do that using HTTP Headers? I'm confused about how they work.
...
Hi,
In continuation of this question I ask the following question.
I've managed to read and understand what D.Shawley has recommended and I already finished a lot of work. But a problem occured to me again. I've managed to get the Content-Length of the page out of the HTTP response, but now I'm experiencing some problems with getting th...