What technology is. ashx and. ashx used for CSS and JS loading?

Source: Internet
Author: User
{Code...} If you run css. ashx separately, the following message is displayed: css. ashx, js. ashx: Usage: css. ashx? HrefA, B, Cjs. ashx? Different files in the same directory of hrefA, B, and C are enclosed in square brackets. css. ashx? Href [AA1, A2] means connection ~ AA1.css and ~ A...

  

If you run css. ashx separately, the following message is displayed:

Css. ashx and js. ashx:Usage:

Css. ashx? Href = A, B, C

Js. ashx? Href = A, B, C

Different files in the same directory are enclosed in square brackets.

Css. ashx? Href = [A/A1, A2] means connection ~ /A/A1.css and ~ /A/A2.css

Js. ashx? Href = [B/B1, B2] indicates connection ~ /B/B1.js and ~ /B/B2.js

Hybrid usage

Css. ashx? Href = A, [B/B1, B2], C/C1 means connection ~ /A.css and ~ /B/B1.css and ~ /B/B2.css and ~ /C/C1.css

Processing of files not found:

If A. CSS is not found,/CSS Combiner file not found ~ /A.css/

If A. JS is not found, the // JS Combiner file not found will appear in the final output result ~ /A. js

12/06/2012 10:22:41. 266 AM

What is the principle? Or is it a dynamic loading technology of. net itself?

Reply content:

  

If you run css. ashx separately, the following message is displayed:

Css. ashx and js. ashx:Usage:

Css. ashx? Href = A, B, C

Js. ashx? Href = A, B, C

Different files in the same directory are enclosed in square brackets.

Css. ashx? Href = [A/A1, A2] means connection ~ /A/A1.css and ~ /A/A2.css

Js. ashx? Href = [B/B1, B2] indicates connection ~ /B/B1.js and ~ /B/B2.js

Hybrid usage

Css. ashx? Href = A, [B/B1, B2], C/C1 means connection ~ /A.css and ~ /B/B1.css and ~ /B/B2.css and ~ /C/C1.css

Processing of files not found:

If A. CSS is not found,/CSS Combiner file not found ~ /A.css/

If A. JS is not found, the // JS Combiner file not found will appear in the final output result ~ /A. js

12/06/2012 10:22:41. 266 AM

What is the principle? Or is it a dynamic loading technology of. net itself?

It is a handler page. It means that the server is set up to process the resource file.

Href = [/public/autocomplete.css], [/index/global.css,header-top.css,header-logo.css,header-nav.css,footer.css,indexcontentv10.css]

Read multiple css codes in the background and return them to the foreground with an http request.

& Amp; v = 20130712115604

This parameter should be specially set to prevent browser caching problems.

& Compress

According to this parameter, the backend should read, splice, and compress all css files and return them to the foreground.

This can optimize the network transmission of resource files: 1. Reduce the number of http requests 2. Reduce the volume of css files

Tengine can be used to merge js and css files.

Please refer to this link http://msdn.microsoft.com/zh-cn/library/bb398986 (v = vs.100). aspx with detailed parsing.
In fact, the original aspx will also be registered as a hanlder by default. The difference between ashx and aspx is that aspx adds many components, attributes, and events for Development convenience, ashx is relatively low-level, so it is relatively simple and has the advantage of being fast.
In fact, this is not the case for ordinary customers. If we reinvent the wheel, we should adopt a third-party framework to compress Js and Css packages.
In addition, Asp. Net 4.5 has built in a framework such as, interested can see http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx.

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.