Showing posts with label http. Show all posts
Showing posts with label http. Show all posts

Monday, June 11, 2012

How do I make an http request using cookies on Android?


I'd like to make an http request to a remote server while properly handling cookies (eg. storing cookies sent by the server, and sending those cookies when I make subsequent requests). It'd be nice to preserve any and all cookies, but really the only one I care about is the session cookie.

What is correct HTTP status code when redirecting to a login page?


When a user is not logged in and tries to access an page that requires login, what is the correct HTTP status code for a redirect to the login page?

Monday, June 4, 2012

Friday, June 1, 2012

JavaScript post request like a form submit


I'm trying to direct a browser to a different page. If I wanted a GET request, I might say

Monday, May 21, 2012

How can I pre-compress files with mod_deflate in Apache 2.x?


I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested.

Friday, May 18, 2012

Sunday, May 13, 2012

Asynchronous HTTP Client for Java


As a relative newbie in the Java world, I am finding many things frustratingly obtuse to accomplish that are relatively trivial in many other frameworks. A primary example is a simple solution for asynchronous http requests. Seeing as one doesn't seem to already exist, what is the best approach? Creating my own threads using a blocking type lib like httpclient or the built-in java http stuff, or should I use the newer non-blocking io java stuff - it seems particularly complex for something which should be simple.

Wednesday, May 2, 2012

Thursday, April 19, 2012

Reduce HTTP requests or not?


A theoretical question:

We all know about the pro's of minifying and combining javascript files in order to reduce HTTP requests to speed up a website. But when popular javascript libraries is used (jQuery for instance), it isn't too stupid to assume that these already have been downloaded to the clients computer from another page.

Is it safe to assume decoded percent-encoded URIs turn into UTF-8?


RFC 3986 states that new URI scheme should be encoded to UTF-8 first before being percent encoded. However, this does not apply to previous URI versions.

how to speed up website loading for opposite side of planet


I am currently running a small piece of PHP software which is being accessed by two groups of people, one group in China, the other in Ireland. The server is hosted in Ireland, and no doubt pages load between 0.3 and 0.8 seconds.

Wednesday, March 7, 2012