<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ajax net::ERR_SPDY_PROTOCOL_ERROR]]></title><description><![CDATA[<p dir="auto">Hello!<br />
I've moved my site to new server (ubuntu 16.04 + nginx + php7.2) and got errors "POST <a href="https://food-tracker.ru/foods" target="_blank" rel="noopener noreferrer nofollow ugc">https://food-tracker.ru/foods</a> <strong>net::ERR_SPDY_PROTOCOL_ERROR</strong>" when it make ajax requests.<br />
There are no errors at FireFox and Internet Explorer browsers! And at previous server with debian7+nginx+php5 all worked fine with latest Opera too. But now latest Opera is not working with the site. Can You help me? How to solve this problem?<br />
Thank You!</p>
]]></description><link>https://forums.opera.com/topic/25567/ajax-net-err_spdy_protocol_error</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 04:04:06 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/25567.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Mar 2018 22:03:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ajax net::ERR_SPDY_PROTOCOL_ERROR on Sat, 10 Mar 2018 12:21:44 GMT]]></title><description><![CDATA[<p dir="auto">Yeah! I've found the solution!<br />
There is a request code example:</p>
<pre><code>$.ajax({
	url: 'https://food-tracker.ru/foods',
	type: 'POST',
	dataType: 'JSON',
	data: {term: 'rjk'},
	success: function (data) {console.log(data);}
});
</code></pre>
<p dir="auto">And there was server code:</p>
<pre><code>protected function returnJSON($data) {
    header('text/html; charset=utf-8');
    echo json_encode($data);
    die(0);
}
</code></pre>
<p dir="auto">The solution is to change line <strong>header('text/html; charset=utf-8');</strong> to <strong>header('Content-type: application/json; charset=utf-8');</strong></p>
<p dir="auto">So, right working code is:</p>
<pre><code>protected function returnJSON($data) {
    header('Content-type: application/json; charset=utf-8');
    echo json_encode($data);
    die(0);
}
</code></pre>
<p dir="auto">Thanks for your attention!</p>
<p dir="auto">P.S. But one question i still have: why was it working fine before, and brokes when just hosting changed?</p>
]]></description><link>https://forums.opera.com/post/141788</link><guid isPermaLink="true">https://forums.opera.com/post/141788</guid><dc:creator><![CDATA[gydrus]]></dc:creator><pubDate>Sat, 10 Mar 2018 12:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to Ajax net::ERR_SPDY_PROTOCOL_ERROR on Sat, 10 Mar 2018 07:29:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/73">@leocg</a> Yes, page loads fine! but after authorization on site some ajax requests are not works. (<br />
Yes, i've tryed all recommendations given by google (clear cache, reset connections and so on), but they was not successfull (</p>
]]></description><link>https://forums.opera.com/post/141779</link><guid isPermaLink="true">https://forums.opera.com/post/141779</guid><dc:creator><![CDATA[gydrus]]></dc:creator><pubDate>Sat, 10 Mar 2018 07:29:41 GMT</pubDate></item><item><title><![CDATA[Reply to Ajax net::ERR_SPDY_PROTOCOL_ERROR on Sat, 10 Mar 2018 02:54:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/197822">@gydrus</a> The page seems to load fine here, does this cause any problem to access the site?</p>
<p dir="auto">A search for 'Ajax net::ERR_SPDY_PROTOCOL_ERROR' returned several results, did you try to check some of them?</p>
]]></description><link>https://forums.opera.com/post/141758</link><guid isPermaLink="true">https://forums.opera.com/post/141758</guid><dc:creator><![CDATA[leocg]]></dc:creator><pubDate>Sat, 10 Mar 2018 02:54:27 GMT</pubDate></item></channel></rss>