Restrictions on ie css files

Source: Internet
Author: User
ArticleDirectory
    • Doc. createstylesheet () invalid argument exception
Doc. createstylesheet () invalid argument exception

Internet Explorer (IE for short) imposes some CSS file limitations that may directly affect page rendering. Below is a list of known CSS file limitations still found in IE version 9 and earlier.

-Up31CSS files or <style> tags per page.
-Up288 KPer CSS file (uncompressed ).
-Up4095Selectors per CSS file.

If a page exceeds the first limit, it fails loading all the required CSS files. Once a CSS file hits the second or third limit, any additional style in the file will be ignored.

Resource merging, which help you reduce the number of requests made to the server, may bring the following dilemma in IE. if you are not using resource merging, you can pretty easily hit the first limit. on the other hand, if resource merging is enabled you may eventually hit the other two limits. so, to avoid hitting the limits, we recommend that you enable or disable resource merging Based on the CSS file structure you are using.

Currently, the solution to automatically manage our CSS files in order to keep them within the limits is not ready yet. we created a corresponding suggestion in our Support Center (suggestion ID: s35991, in IE, automatically split CSS resources if their size exceeds 288 K) so that you can track our progress on it.

The first limitation usually occurs when<Head>Tag contains several<Link>And<Style>Tags. A number of linked styles to the page can be got viaDocument. stylesheets. LengthProperty in the Javascript console. UsingDocument. stylesheetsCollection, you will be able to determine what styles are linked to a specific page (e.g. Use the firebug console ).

Http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx

Resource merging http://documentation.devexpress.com/#AspNet/CustomDocument6911

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.