Style file cross domain causes Respond.js plugin to fail in IE browser

Source: Internet
Author: User

respond.js Home: https://github.com/scottjehl/Respond

Respond.js is to solve the IE6-IE8 does not support the responsive design of a plug-in, can implement CSS3 media query, official demo address:https://rawgit.com/scottjehl/ respond/master/test/test.html

in Chrome, Firefox, IE browser testing the official page is normal, the page background color will change with the size of the browser window. You can see that the page's style file and test page itself are under the same domain name. In general, large and medium-sized websites typically place style files under a subdomain, which is not useful if you are referencing the plugin separately.

The official solutions are as follows:

For example:

The address of the Web page is: http://www.domain.com/index.html CSS file Address: Http://static.domain.com/css/common.cssRespond.js file Address:/http Static.domain.com/js/respond.js


Download the two files in the Cross-domain folder under the compressed package : respond-proxy.html, Respond.proxy.gif placed in the folder where the www.domain.com domain name resides, the file path is assumed to be:  

Http://www.domain.com/respond/respond-proxy.htmlhttp://www.domain.com/respond/respond.proxy.gif


file respond-proxy.html is placed under the sub-domain name folder where the file path is assumed to be:

Http://static.domain.com/html/respond-proxy.html


Web page file http://www.domain.com/index.html the head should be written like this:

<! DOCTYPE html>


in the case of a narrow screen, ie has a 0.5-second splash screen, but it doesn't look very obvious.

when IE is completely wiped out, the front of the World Smile solutions!



Style file cross domain causes Respond.js plugin to fail in IE browser

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.