Failed to load resouce: the server responded with a status of 406 (Not Acceptable)

Shehary picture Shehary · Sep 25, 2015 · Viewed 10.9k times · Source

I'm getting this error in browser console log, both chrome and firefox

GET doaminipaddress.port/n/d85639d2ff510307eedab9f654a0d8a4.js?q=y52W3GiXHD…886&url=http%3A%2F%2domain.net%2Fassets%2Fscripts%2Fjquery.min.js 406 (Not Acceptable)

but the jQuery is right there in the folder with rest of the JS files

406-error

If I open the jQuery directly in browser, it opens correctly.

I've tried

  1. changed path from absolute
  2. renamed script folder
  3. checked all tags properly closed
  4. header section checked but incase if you want to look

Header section

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link href='http://fonts.googleapis.com/css?family=Roboto:500,900,300,700,400' rel='stylesheet' type='text/css'>
    <link href="./assets/style/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="./assets/style/style.css" rel="stylesheet" type="text/css" />
    <link href="./assets/style/responsive.css" rel="stylesheet" type="text/css" />
    <link href="./assets/style/animate.css" rel="stylesheet" type="text/css" />
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" />
    <link href="./assets/style/custom.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesnt work if you view the page via file:// -->
    <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

I checked same error related question on SO but either they have this problem while using a framework or with Ajax but I'm not using any framework and weird behavior is that sometime it just loads correctly and I'm totally lost why it gives an error and next refresh attempt, jQuery load correctly.

Answer

sh0rug0ru picture sh0rug0ru · Sep 25, 2015

"406 Not Acceptable" means that the server can't deliver whatever content type was specified in the Accept header in the request. What content type is the browser asking for?