406 error to retrieve jquery.cookie.js file


In a project, I need to use jquery.cookie.js file. It’s weird that this file is already uploaded to the server, and I just could not retrieve it, but got 406 Error. The following is the message I got from Firefox:

Not Acceptable
An appropriate representation of the requested resource /wocai/jquery.cookie.js could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Cannot figure out why, but after I changed the file name to jquery_cookie.js, it fixed the problem. Could the server is not happy file the filename?

17 thoughts on “406 error to retrieve jquery.cookie.js file”

  1. I can’t believe that we’re the only ones on the entire interwebz that have suffered from this. I’ve been Googling the whole jquery.cookie.js — 406: Not Acceptable thing all day long. Thanks for the suggestion! It worked perfectly. Does anyone know why the file name screws up finding it? Oh well… Thanks again!

  2. I just spent an hour dealing with this. Apparently our hosting provider has ModSecurity turned on and that #(@#*$ing thing thinks that jquery.cookie.js is a XSS attack.

    [Thu Jun 23 00:08:53 2011] [error] [client] ModSecurity: Access denied with code 406 (phase 2). Pattern match “(?:\\b(?:(?:type\\b\\W*?\\b(?:text\\b\\W*?\\b(?:j(?:ava)?|ecma|vb)|application\\b\\W*?\\bx-(?:java|vb))script|c(?:opyparentfolder|reatetextrange)|get(?:special|parent)folder|iframe\\b.{0,100}?\\bsrc)\\b|on(?:(?:mo(?:use(?:o(?:ver|ut)|down|move|up)|ve)|key(?:press|d …” at REQUEST_FILENAME. [file “/usr/local/apache/conf/modsec2.user.conf”] [line “113”] [id “950004”] [msg “Cross-site Scripting (XSS) Attack”] [data “.cookie”] [severity “CRITICAL”] [tag “WEB_ATTACK/XSS”]

    1. The only time I’ve dropped a net lingo buzzword is to make fun of the people who live by them. Occasionally I doubt that my intent was understand, and for that I’ve received total fail.

    1. I think those who are unhappy about this are channeling some of their past frustrations on this issue because of Rossi, Subotic and others. A little annoyance is justified but Timmy’s “snubs” weren’t as egregious as people have made them out to be. We don’t have the luxury of having ill-will towards good players. We need the best we can get at all times.

    1. Is it 406 error in your case?
      What file name you changed to? You can change to any name, so maybe don’t use “cookie” in the file name.
      You can also try to copy the content of jquery.cookie.js file to another js file to see what happened.

  3. many thanks, I served a lot, my client wanted to kill me now! the question for now is how to make our server does not delete important files on suspicion, I appreciate the post …

Leave a Reply

Your email address will not be published. Required fields are marked *