I have developed an application which uses a jQuery plugin, which in turn uses excessive cookie data. The problem is, after every 15-20 request I am shown this error message by the browser:

Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.

After digging around, I came to know by default apache has the default value of cookie length; somewhere around 8190 bytes. To increase the limit, I need to change/add the directive below to my configuration.

LimitRequestFieldSize 16380

I tried adding the above code in .htaccess, and restarted the apache server too, but it didn't work.

I am confused on where to place this line; Is it in the httpd.conf file? Or is there any way I can increase the limit using the .htaccess file? I would appreciate if someone could point me in the right direction.

and BTW, I am on OSX 10.7.4 using MAMP.

1 Answer 1


The documentation states the following:

Context: server config, virtual host

This means that that directive either goes into the global server configuration (anywhere in your httpd.conf file or in a file that gets included), or in one of the VirtualHost definitions. It won't work if you place it in an .htaccess file.

You should probably also review your application to see where that excess data comes from.

  • Thank you, I was trying to make it work via .htaccess and nothing seemed to work. I put it in httpd.conf, restarted apache and it now works.
    – Altin
    Dec 20, 2022 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .