mobylette icon indicating copy to clipboard operation
mobylette copied to clipboard

Ignore mobile on JSON requests

Open stevebooks opened this issue 12 years ago • 2 comments

I have an iPhone app that is requesting JSON from my server. Rather than defaulting to the JSON respond_to, it is responding as if mobile.

stevebooks avatar May 25 '13 00:05 stevebooks

Theoretically it should not do this by default. The default behaviour is to skip these kind of requests. Could you try ensuring that the correct option is set?

mobylette_config do |config|
  config[:skip_xhr_requests] = true # this should be the default value anyway
end

tscolari avatar May 25 '13 11:05 tscolari

Technically speaking is every JSON request a XHR request? I know if your call JSON using jQuery it registers as XHR, but what if I am just calling it from a iPhone application? Is it still technically a XHR request (since I am not calling it through AJAX)?

stevebooks avatar May 25 '13 15:05 stevebooks