我有一个导轨后端和正在测试针对它下面的jQuery代码:
var content = $("#notification_content").val();
var data = new Object();
data.content = content;
$.ajax({ url: "/notifications/detect_type.json", type:"POST", data: data, success: function(result ){updateTypeDropDown(result)}});
此代码工作正常在Chrome和IE中。不过在Firefox(使用Firebug),我看到: http://localhost:3000/notifications/detect_type.json 406不可接受
这里是日志中的Firefox要求:
处理 NotificationsController#detect_type (用于在127.0.0.1 2010-12-21 17:05:59) 参数: {“action”=>“detect_type”, “content”=>“226 south emerson denver co 80209”, “controller”=> “通知”}用户 C (2.0ms)SHOW FIELD从
users
用户负载(37.4ms)SELECT *从users
WHERE(users
。限制1在58ms内完成(查看: 1,DB:40)| 406不可接受[HTTP://localhost/notifications/detect_type.json]
这里是在日志中铬请求:
处理 NotificationsController#detect_type (对于127.0.0.1在2010-12-21 17:06:41) [POST]参数:{“action”=>“detect_type”, “content”=>“226 south emerson 80209”, “controller”= >“的NotI fications“}
用户列(2.1ms)显示字段FROMusers
用户负载(30.4ms)
SELECT * FROMusers
WHERE(users
。限制1完成 in 100ms(查看:1,DB:33)|
200 OK [HTTP://localhost/notifications/detect_type.json]
我难倒。想法?
对于任何人可能会遇到这种情况,我在Firefox中有完全相同的错误,然后我意识到我的Firefox在Firefox中被禁用。 – lnreddy 2013-07-01 10:42:47