Skip to content

Commit

Permalink
deprecate x-domain hack
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Oct 26, 2015
1 parent 86dea4a commit 1c8ce14
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions README.md
Expand Up @@ -30,28 +30,7 @@ Usage Instructions
CDN/X-Domain Setup
======

Respond.js works by requesting a pristine copy of your CSS via AJAX, so if you host your stylesheets on a CDN (or a subdomain), you'll need to upload a proxy page to enable cross-domain communication.

See `cross-domain/example.html` for a demo:

- Upload `cross-domain/respond-proxy.html` to your external domain
- Upload `cross-domain/respond.proxy.gif` to your origin domain
- Reference the file(s) via `<link />` element(s):

<pre>
&lt;!-- Respond.js proxy on external server --&gt;
&lt;link href=&quot;http://externalcdn.com/respond-proxy.html&quot; id=&quot;respond-proxy&quot; rel=&quot;respond-proxy&quot; /&gt;

&lt;!-- Respond.js redirect location on local server --&gt;
&lt;link href=&quot;/path/to/respond.proxy.gif&quot; id=&quot;respond-redirect&quot; rel=&quot;respond-redirect&quot; /&gt;

&lt;!-- Respond.js proxy script on local server --&gt;
&lt;script src="/path/to/respond.proxy.js"&gt;&lt;/script&gt;
</pre>

If you are having problems with the cross-domain setup, make sure respond-proxy.html does not have a query string appended to it.

Note: HUGE thanks to @doctyper for the contributions in the cross-domain proxy!
Respond.js works by requesting a pristine copy of your CSS via AJAX, so if you host your stylesheets on a CDN (or a subdomain), you'll need to set up a local proxy to request the CSS for old IE browsers. Prior versions recommended a deprecated x-domain approach, but a local proxy is preferable (for performance and security reasons) to attempting to work around the cross-domain limitations.


Support & Caveats
Expand Down

0 comments on commit 1c8ce14

Please sign in to comment.