CN102622376A - Method and equipment used for merging cascading style sheet files - Google Patents

Method and equipment used for merging cascading style sheet files Download PDF

Info

Publication number
CN102622376A
CN102622376A CN2011100351413A CN201110035141A CN102622376A CN 102622376 A CN102622376 A CN 102622376A CN 2011100351413 A CN2011100351413 A CN 2011100351413A CN 201110035141 A CN201110035141 A CN 201110035141A CN 102622376 A CN102622376 A CN 102622376A
Authority
CN
China
Prior art keywords
css file
css
file
merging
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011100351413A
Other languages
Chinese (zh)
Inventor
李靖威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Oak Pacific Interactive Technology Development Co Ltd
Original Assignee
Beijing Oak Pacific Interactive Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Oak Pacific Interactive Technology Development Co Ltd filed Critical Beijing Oak Pacific Interactive Technology Development Co Ltd
Priority to CN2011100351413A priority Critical patent/CN102622376A/en
Publication of CN102622376A publication Critical patent/CN102622376A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention relates to a method and equipment used for merging cascading style sheet (CSS) files, and in particular discloses the method for merging the CSS files. The method comprises the following steps of: acquiring a first CSS file associated with a Web page to be loaded; judging whether the first CSS file contains a predefined label; and merging the second CSS file indicated by the predefined label and the first CSS file in response to that the CSS file is determined to contain the predefined label. The embodiment of the invention discloses corresponding equipment.

Description

The method and apparatus that is used for amalgamation layer stacking style table file
Technical field
Embodiment of the present invention relates generally to the network information technology, more specifically, relates to the method and apparatus that is used for amalgamation layer stacking style table file.
Background technology
Along with development of internet technology, CSS (Cascading Style Sheet, hereinafter referred CSS) has become an important component part of modern network infotech.CSS can be used as independent file and exists, and also is comprised among the source code file (for example, hypertext link language html file) of the corresponding Web page as code segment.CSS can be used for defining one group with the drafting of the Web page with present relevant rule, to be used to control the outward appearance and/or the user interactions of the Web page.For example, the CSS file can limit the pattern of font in the Web page, font size, hyperlink, to the response of various user interactions incidents, or the like.
Through using CSS that the form of the Web page is set, can realize the content of the Web page and separating of the form of expression.The Web content of pages leaves in the html document, and the CSS rule that is used for defining the form of expression leaves certain part (being generally the file header part) of another file or html document in.The outward appearance of maintenance site is more prone to, but also can makes the html document code more terse, shorten the load time of browser.In addition, the use of CSS also helps the modification of the Web page, is convenient to the unification of Web page style.
In order to improve the maintainable of Web website and management development and maintenance process better, at present, the CSS rule exists with the form of independent CSS file usually.In the exploitation of medium-and-large-sized Web website, tend to relate to numerous (hundreds of and even thousands of) CSS file.How to develop and manage these CSS files and have material impact for the exploitation and the operation of Web website.
From the angle of the exploitation and the maintenance of Web website, the function granularity that reduces the CSS file as much as possible is favourable.Also promptly, each CSS file being limited only is associated with relatively independent function as much as possible.Yet on the other hand, the CSS number of files that too small granularity possibly cause being associated with the Web page is too much.At this moment, when loading the Web page, will cause the more network service of number (for example, HTTP request and response) in order to obtain these CSS files, this is with the rendering performance of the appreciable impact Web page, and increase is to the pressure of the network bandwidth.This shows, on the function granularity division of CSS and corresponding storage scheme, exist contradiction.
In order to overcome this problem, the solution that the CSS file is dynamically merged has been proposed in the prior art.According to this scheme, the developer still guarantees the function granularity of CSS enough little (thus, will have the more CSS file of number) as far as possible in the performance history of Web website.When needs loaded certain specific Web page, a plurality of CSS that are associated with this Web page were dynamically merged, the number of the CSS file that need transmit through network with reduction.In this way, can reduce the number and the Internet traffic of network requests, quicken the loading of the Web page.
Yet, in the prior art, the merging of CSS file is controlled through configuration file independently.In other words, the consolidation strategy of CSS file and mode are limiting with another configuration file that the Web page separates with the CSS file.This scheme of prior art can be called " exterior arrangement " scheme.Though the exterior arrangement scheme can reduce the number of CSS file effectively, yet the management of configuration file itself extra human and material resources and time overhead have been increased.And, it will be understood by those skilled in the art that the exterior arrangement scheme is a kind of centralized solution in essence, the merging of promptly numerous CSS files is controlled by the minority configuration file.In case configuration file itself is lost or mistake occurred, will cause a plurality of Web pages even whole Web website to be affected, possibly cause bigger loss potentially.
And, in the prior art, merge normally by the CSS file of configuration file control and to merge simply end to end, that is, a CSS file is attached to after another CSS file as a whole.This is owing to be difficult in the concrete merging mode (for example, the insertion position of content) of describing two or more CSS files in the configuration file exactly.It will be understood by those skilled in the art that this simple front and back that possibly cause attribute among the CSS that merge end to end cover (that is, the attribute of back definition has covered the attribute of previous definition in the file), cause potentially that the Web page appears wrong or expected result not.
Summary of the invention
In order to overcome above-mentioned defective of the prior art, embodiment of the present invention is provided for the method and apparatus of the novelty of CSS file merging.
In one aspect of the invention, a kind of method that is used for amalgamation layer stacking style table CSS file is provided, comprises: obtain a CSS file that is associated with the Web page that will load; Confirm whether comprise the predefine label in the said CSS file; Comprise said predefine label in response to confirming in the said CSS file, the 2nd a CSS file that said predefine label is indicated and a said CSS file merge.According to some optional embodiment, said merging comprises: in the position of said predefine label in a said CSS file, the content of said the 2nd CSS file is inserted a said CSS file.According to some optional embodiment, said predefine label is stated by the import statement.According to some optional embodiment, said method also comprises: in response to said merging, the relative path of the URL (URL) that comprises in said the 2nd CSS file is changed.According to some optional embodiment, said merging comprises: under the situation that does not cover a said CSS file, generate new merging CSS file.
In still another aspect of the invention, a kind of equipment that is used for amalgamation layer stacking style table CSS file is provided, comprises: deriving means, configuration is used to obtain a CSS file that is associated with the Web page that will load; Confirm device, configuration is used for confirming whether a said CSS file comprises the predefine label; Merge device, configuration is used for comprising said predefine label in response to definite said CSS file, and the 2nd a CSS file that said predefine label is indicated and a said CSS file merge.
According to the embodiment of the present invention; In the performance history of Web website; Can guarantee that each CSS file has the function granularity of trying one's best little on the one hand; Can comprise through appropriate location on the other hand when predefine label (import statement for example details like hereinafter) is managed the operation of CSS file and dynamically merge at the CSS file.Correspondingly, only need comprise the less CSS file applications of number in the html file of the Web page.
Thus; In the actual loaded process of the Web page; For the CSS file that is associated with this page, embodiment of the present invention will dynamically obtain other CSS files according to predefine label (if existence) wherein, and these CSS files are dynamically combined with current C SS file.In this way, the merging of CSS file realizes with the mode of a kind of fully " self-configuring ", and need not the auxiliary of any exterior arrangement file, and this has greatly improved the effectiveness and the dirigibility of exploitation of Web website and management.And according to preferred implementation of the present invention, the merging of CSS file can be accomplished according to the position of label in the CSS file.Thus, can control the merging of CSS file exactly, and then control the behavior that merges the CSS file exactly, rather than carry out merging end to end simply as that kind in the prior art.
Description of drawings
Through detailed description with reference to the advantages hereinafter, above-mentioned and other purposes of embodiment of the present invention, the feature and advantage easy to understand that will become.In the accompanying drawings, show plurality of embodiments of the present invention with exemplary and nonrestrictive mode, wherein:
Fig. 1 shows the process flow diagram of method 100 that is used to merge the CSS file according to exemplary embodiment of the invention;
Fig. 2 shows the block diagram of equipment 200 that is used to merge the CSS file according to exemplary embodiment of the invention; And
Fig. 3 shows the block diagram that is fit to be used for put into practice the computer system of embodiment of the present invention.
In the accompanying drawings, identical or corresponding label is represented identical or corresponding part.
Embodiment
Below with reference to some illustrative embodiments principle of the present invention and spirit are described.Should be appreciated that providing these embodiments only is in order those skilled in the art can be understood better and then to realize the present invention, and be not to limit scope of the present invention by any way.
As indicated above, according to the embodiment of the present invention, the developer of Web website can comprise predefined label in the position that possibly need to merge when writing the CSS file.In the loading procedure of the Web page,, will dynamically obtain other CSS files according to predefine label (if existence) wherein, and these CSS files will dynamically be combined with current C SS file for the CSS file that is associated with this page.Thus, according to the embodiment of the present invention, the merging of CSS file realizes with " self-configuring " mode, need not the participation of any exterior arrangement file.And according to preferred implementation of the present invention, the merging of CSS file can be accomplished according to the position of label in the CSS file.Thus, can control the merging of CSS file exactly, thereby control merges the behavior of back CSS file.
Describe various embodiment of the present invention below in conjunction with accompanying drawing in detail with the mode of example.At first with reference to figure 1, it shows the process flow diagram of method 100 that is used to merge the CSS file according to exemplary embodiment of the invention.Each step that should be appreciated that record in the method 100 can be carried out according to different orders, and/or executed in parallel.In addition, method 100 can comprise additional step and/or omit the step shown in carrying out.Scope of the present invention is unrestricted in this regard.
After method 100 beginnings,, obtain a CSS file that is associated with the Web page that will load at step S102.It will be understood by those skilled in the art that it can obtain the html file of this Web page when application request such as for example browser load certain particular Web pages.As as known in the art, in the html source file of Web, for example can indicate the URL (URL) of the CSS file that is associated with this Web page.As a concrete example, the URL of the CSS file that is associated usually can with < link>label of the html file of the Web page in indicate, and < link>label is generally comprised within the head by < head>label definition.Following table 1 has provided the concrete example that utilization < link>label is indicated the URL of CSS file:
Figure BSA00000431491600051
Table 1
In the example of table 1, the URL address of the CSS file that is associated with this Web page is " http://XXX/YYY/AAA.css ".Thus, when this Web page will be loaded, can obtain this CSS file, i.e. an alleged CSS file among the step S102 according to this URL address.
Then, at step S104, confirm whether include the predefine label in the CSS file.According to the embodiment of the present invention, said predefine label is used to indicate current C SS file (a CSS file) to merge with other CSS files (being called the 2nd CSS file).And according to the embodiment of the present invention, this predefine label can be specified the position of the 2nd CSS file, for example the URL address.
According to the embodiment of the present invention, this predefine label is a user customizable.In other words, under the framework of the grammer of CSS and the syntax, user (for example, developer) can define the predefine label that suitable arbitrarily label merges as indication CSS file.
Especially, according to preferred implementation of the present invention, this predefine label can utilize the import statement in the CSS grammer to realize.As as known in the art, defined the statement of a kind of " import " by name in the CSS grammer, it is mainly used in quoting of CSS file.The original intention of in CSS mechanism, introducing import is to utilize it to realize and the identical effect of < link>label.For example, the example that provides in the consideration table 1 once more, if use the import statement, then quoting of this CSS file stated as follows:
Figure BSA00000431491600061
Table 2
Yet, in the actual use of import, exist problems.A most important problem is that different with < link>mechanism, the CSS file that utilizes the import statement to quote can just begin to load after the target Web page all is downloaded.So browsing when loading the Web page of CSS file through import, the phenomenon of page flicker (or claim " dodging screen ") usually can appear, and particularly evident when network connection speed is slow.This has caused the import statement in the Web Development Practice, seldom to be used.
Yet, according to preferred implementation of the present invention, can carry out escape (that is, heavy duty), with its predefine label that merges as indication CSS file to the import statement.According to such embodiment; For example; When the developer writes a CSS file; He can comprise the import statement the appropriate location in the CSS file (selection of particular location will be explained below), other CSS files (that is the 2nd CSS file) that indication will merge with a CSS file in the parameter thereafter " URL ".As a concrete example, the table 3 that vide infra, it shows the import statement that how in a CSS file (a CSS file), utilizes through escape as the predefine label, with the dynamic merging of indication CSS file.
Figure BSA00000431491600071
Table 3
In the embodiment of the present invention shown in the table 3, the import statement is not used further to load to the target Web page CSS file of appointment.On the contrary; According to the equipment of embodiment of the present invention (for example; The equipment 200 that hereinafter is described) when handling this CSS file, will be interpreted as the predefine label among the step S104 to the import statement, then that this label is indicated CSS file should merge with current C SS file.Although should be appreciated that in the example of table 3, only show an import statement, can comprise the import statement of arbitrary number in the CSS file, this will be explained below.
Utilize the import statement to realize that the predefine label is useful.At first, as stated, because the import statement can cause dodging the screen problem in the drawing process of the Web page, so it seldom is used (or never being used) in reality.In this case, the import statement being carried out escape and heavy duty can not impact the existing Web page.Secondly, because the import statement is one of standard syntax of CSS, grasps and understand so it is most of Web website developers.Therefore, utilize the import statement to come the predefine label among the performing step S104, developer's learning burden is minimized, guarantee exploitation and the efficient of safeguarding.
Although there is above-mentioned advantage, should be appreciated that it only is exemplary utilizing the import statement to come the predefine label among the performing step S104.In fact, in order to realize the object of the invention, those skilled in the art can define any suitable new label according to concrete application and demand, and/or other existing labels are carried out the escape heavy duty.Scope of the present invention is unrestricted in this regard.
If in step S104, confirm not comprise predefine label (branch " denys ") in the CSS file, then method 100 finishes.In this case, will handle a CSS file in the conventional mode, for example, send it to application such as browser to be used for appearing of the Web page.
On the other hand, if in step S104, confirm to include predefine label (branch " is ") in the CSS file, then method proceeds to step S106, merges at this 2nd a CSS file that predefine label is indicated and a CSS file.As indicated above, according to the embodiment of the present invention, the predefine label has been specified the position of the 2nd CSS file, for example URL address.According to specified position, can obtain the 2nd CSS file.After obtaining the 2nd CSS file, can realize the merging of CSS file according to different ways.
For example, according to some embodiment of the present invention, can merge a CSS file and the 2nd CSS file according to the mode that merges end to end.In other words, the full content of the 2nd CSS file is attached to after the original contents of a CSS file.In addition, according to other embodiments of the present invention, can carry out merging according to predefined standard.For example, can the content of the 2nd CSS file be inserted into the assigned address among the CSS.
Especially, according to preferred implementation of the present invention, the merging among the step S106 realizes like this: in the position of predefine label in a said CSS file, the content of said the 2nd CSS file is inserted a said CSS file.In other words, according to such embodiment, import statement itself will be by the content to replace of the 2nd CSS file (covering).Consider the example shown in the preceding text table 3 once more, suppose theing contents are as follows of the 2nd CSS file that URL " http://XXX/YYY/AAA.css " in the import statement is indicated:
#tag{font-size:120%;font-weight:bold;border:2pxdashed?gray;clear:both;margin:1em;padding:1em}
Then according to above-mentioned preferred implementation of the present invention, after carrying out the merging of a CSS file and the 2nd CSS file, the CSS file that obtains is shown in following table 4:
Figure BSA00000431491600091
Table 4
According to this preferred implementation of the present invention; " self-configuring " that not only can realize the CSS file merges; And (for example, concrete merging mode is specified in position import), and promptly the content of the 2nd CSS file should be how merges with the content of a CSS file can to pass through the predefine label.Covering problem before and after the attribute that possibly exist in can avoiding effectively merging end to end thus.And, in this way, developer and/or maintainer can through complete controllable mode manage the CSS file merging and the Web page present behavior.
In addition, according to the embodiment of the present invention, in the process that carry out to merge, can be directly the content of the 2nd CSS file be merged in the CSS file.In other words, the merging CSS file of generation can directly cover a CSS file.Though this mode is feasible, will destroys source document, thereby possibly cause adverse effect follow-up exploitation and maintenance.Therefore, according to preferred implementation of the present invention, can under the situation that does not cover a said CSS file, generate new merging CSS file.For example, to merge a CSS file and the 2nd CSS file, can at first create the copy of a CSS file, then copy and carry out merging based on this in response to confirming.
After the merging of carrying out a CSS file and the 2nd CSS file,, the URL relative path in the 2nd CSS file is changed at optional step S108.As known in the art, the CSS grammer allows external file is quoted, and promptly introduces the outside image of CSS file, font etc. through uniform resource position mark URL.After a CSS file and the 2nd CSS file merged, the URL of the 2nd CSS file itself possibly change.In this case, relative path also will change thereupon, thereby possibly cause the fixed path no longer valid of the 2nd CSS document.In this case, at step S108, can the URL that comprise in former the 2nd CSS file be changed according to the URL path of the CSS file that merges the back generation, it is continued is effective URL address.
Be appreciated that step S108 is optional.For example, when not comprising URL in the 2nd CSS file and/or using the absolute path of URL, need not execution in step S108.And for example, when the CSS file after merging is in identical root directory with former the 2nd CSS file, also need not execution in step S108.
After the operation of step S108 was accomplished, as shown in Figure 1, method 100 was returned step S104, thereby confirmed whether also comprise other predefine labels in the former CSS file.According to the embodiment of the present invention, to each the predefine label that exists in the former CSS file, the subsequent operation of repetition methods 100 no longer comprises the predefine label in a former CSS file.The merging CSS file of gained is returned the application (for example, web browser) to the request of loading Web page, to be used for appearing of this Web page.
Be appreciated that according to the embodiment of the present invention method 100 can be directed against the nested execution of a plurality of CSS files.For example, if also comprise this type of predefine label (for example, the import statement) in the 2nd CSS file, can repeat each step of method 100 to the 2nd CSS file.According to the embodiment of the present invention, the nested execution of method 100 can be carried out according to multiple mode.For example, can come the nested execution of implementation method 100 based on the breadth First principle.In such embodiment, with all predefine label manners of execution 100 that at first are directed against in the CSS file; Then to the predefine label that comprises in each the CSS file that merges with a CSS file and manner of execution 100.Alternatively or additionally, also can come the nested execution of implementation method 100 based on the depth-first principle.This it will be appreciated by those skilled in the art that, repeats no more at this.
With reference now to Fig. 2,, it shows the block diagram of equipment 200 that is used to merge the CSS file according to exemplary embodiment of the invention.At some embodiment of the present invention, equipment 200 can be implemented as the part of Web server.Alternatively, equipment 200 also can be implemented as can with any suitable network equipment of the application (for example, browser) of the Web server and request of loading Web page communication, for example acting server (proxy) etc.
As shown in Figure 2, according to the embodiment of the present invention, equipment 200 comprises deriving means 202, and configuration is used to obtain a CSS file that is associated with the Web page that will load.Equipment 200 also comprises confirms that device 204, configuration are used for confirming whether a said CSS file comprises the predefine label.In addition, equipment 200 comprises merging device 206, and configuration is used for comprising said predefine label in response to definite said CSS file, and the 2nd a CSS file that said predefine label is indicated and a said CSS file merge.
According to some optional embodiment of the present invention; Merging device 204 further comprises: configuration is used in the position of a CSS file content of said the 2nd CSS file being inserted the device of a said CSS file at said predefine label, and/or disposes the device that is used under the situation that does not cover a said CSS file, generating new merging CSS file.
As indicated above, according to some optional embodiment of the present invention, the predefine label is realized by the import statement.In addition, according to some optional embodiment of the present invention, equipment 200 can also comprise path converting device 208, and the relative path of the uniform resource position mark URL that configuration is used in response to said merging said the 2nd CSS file being comprised is changed.
Each device that should be appreciated that record in the equipment 200 is corresponding with each step in the method for describing with reference to figure 1 100.Thus, preceding text are directed against the operation of Fig. 1 description and the device that characteristic is equally applicable to equipment 200 and wherein comprises, and repeat no more at this.
It is also understood that equipment 200 can utilize variety of way to realize.For example, in some embodiments, equipment 200 can utilize software and/or firmware module to realize.In addition, equipment 200 also can utilize hardware module to realize.For example, equipment 200 can be implemented as integrated circuit (IC) chip or special IC (ASIC).Equipment 200 also can be implemented as SOC(system on a chip) (SOC).Other modes known now or exploitation in the future also are feasible, and scope of the present invention is unrestricted in this regard.
Fig. 3 shows the block diagram that is suitable for being used for realizing the computer system of embodiment of the present invention.As shown in Figure 3, computer system can comprise: CPU (CPU) 301, RAM (RAS) 302, ROM (ROM (read-only memory)) 303, system bus 304, hard disk controller 305, KBC 306, serial interface controller 307, parallel interface controller 308, display controller 309, hard disk 310, keyboard 311, serial external unit 312, parallel external unit 313 and display 314.In these parts, what link to each other with system bus 304 has CPU 301, RAM 302, ROM 303, hard disk controller 305, KBC 306, serialization controller 307, parallel controller 308 and a display controller 309.Hard disk 310 links to each other with hard disk controller 305; Keyboard 311 links to each other with KBC 306; Serial external unit 312 links to each other with serial interface controller 307, and parallel external unit 313 links to each other with parallel interface controller 308, and display 314 links to each other with display controller 309.Should be appreciated that the described structured flowchart of Fig. 3 illustrates just to the purpose of example, rather than limitation of the present invention.In some cases, can increase or reduce wherein some equipment as required.
Especially, except that the hardware embodiment, embodiment of the present invention can be realized through the form of computer program.For example, the method for describing with reference to figure 1 100 can realize through computer program.This computer program can be stored in RAM for example shown in Figure 3 302, ROM 303, hard disk 310 and/or any suitable storage medium, perhaps downloads on the computer system 300 from suitable position through network.Computer program can comprise the computer code part, and it comprises can be by the programmed instruction of proper process equipment (for example, the CPU shown in Fig. 3 301) execution.Said programmed instruction can comprise at least: the instruction that is used to obtain a CSS file that is associated with the Web page that will load; Be used for confirming whether a said CSS file comprises the instruction of predefine label; And be used in response to confirming that said CSS file comprises said predefine label and the instruction of the 2nd CSS file that said predefine label is indicated and the merging of a said CSS file.
Preceding text have combined some embodiments to explain spirit of the present invention and principle.Embodiment of the present invention provides the method and apparatus of the novelty that is used to merge the CSS file.According to the embodiment of the present invention, in the performance history of Web website, can guarantee that each CSS file has the function granularity of trying one's best little on the one hand, can realize that on the other hand effective CSS file dynamically merges.Compared with prior art, according to the embodiment of the present invention, the CSS file merges with a kind of mode of " self-configuring " fully realizes that need not the participation of any exterior arrangement file, this has greatly improved dirigibility and maintainability.And according to preferred implementation of the present invention, the merging of CSS file can be accomplished according to the position of label in the CSS file.Thus, can control the merging of CSS file exactly, thereby control merges the behavior of back CSS file.
Should be noted that embodiment of the present invention can realize through the combination of hardware, software or software and hardware.Hardware components can utilize special logic to realize; Software section can be stored in the storer, and by suitable instruction execution system, for example microprocessor or special designs hardware are carried out.Those having ordinary skill in the art will appreciate that can use a computer executable instruction and/or be included in the processor control routine of above-mentioned equipment and method realizes, for example provides such code on such as the mounting medium of disk, CD or DVD-ROM, such as the programmable memory of ROM (read-only memory) (firmware) or the data carrier such as optics or electronic signal carrier.Equipment of the present invention and module thereof can by such as VLSI (very large scale integrated circuits) or gate array, such as the semiconductor of logic chip, transistor etc., or realize such as the hardware circuit of the programmable hardware device of field programmable gate array, programmable logic device etc.; Also can use the software of carrying out by various types of processors to realize, also can by the combination of above-mentioned hardware circuit and software for example firmware realize.
The communication network of mentioning in the instructions can comprise disparate networks, includes but not limited to LAN (" LAN "), and wide area network (" WAN ") is based on the network (for example, the Internet) and the ad-hoc network (for example, ad hoc peer-to-peer network) of IP agreement.
Although should be noted that the some devices or the sub-device of the equipment of in above-detailed, having mentioned, this division only is not enforceable.In fact, according to the embodiment of the present invention, the characteristic of above-described two or more devices and function can be specialized in a device.Otherwise the characteristic of an above-described device and function can further be divided into by multiple arrangement to be specialized.
In addition, although described the operation of the inventive method in the accompanying drawings with particular order,, this is not that requirement or hint must be carried out these operations according to this particular order, or the operation shown in must carrying out all could realize the result of expectation.On the contrary, the step of describing in the process flow diagram can change execution sequence.Additionally or alternatively, can omit some step, a plurality of steps merged into a step carry out, and/or a step is decomposed into a plurality of steps carries out.
Though described the present invention, should be appreciated that the present invention is not limited to disclosed embodiment with reference to some embodiments.The present invention is intended to contain included various modifications and equivalent arrangements in spirit and the scope of accompanying claims.The scope of accompanying claims meets the most wide in range explanation, thereby comprises all such modifications and equivalent structure and function.

Claims (10)

1. method that is used for amalgamation layer stacking style table CSS file comprises:
The CSS file that the Web page that obtains and will load is associated;
Confirm whether comprise the predefine label in the said CSS file;
Comprise said predefine label in response to confirming in the said CSS file, the 2nd a CSS file that said predefine label is indicated and a said CSS file merge.
2. the method for claim 1, wherein said merging comprises:
In the position of said predefine label in a said CSS file, the content of said the 2nd CSS file is inserted a said CSS file.
3. the method for claim 1, wherein said merging comprises:
Under the situation that does not cover a said CSS file, generate new merging CSS file.
4. the method for claim 1, wherein said predefine label is realized by the import statement.
5. the method for claim 1 also comprises:
In response to said merging, the relative path of the uniform resource position mark URL that comprises in said the 2nd CSS file is changed.
6. equipment that is used for amalgamation layer stacking style table CSS file comprises:
Deriving means, configuration is used to obtain a CSS file that is associated with the Web page that will load;
Confirm device, configuration is used for confirming whether a said CSS file comprises the predefine label;
Merge device, configuration is used for comprising said predefine label and the 2nd CSS file and the merging of a said CSS file that said predefine label is indicated in response to definite said CSS file.
7. equipment as claimed in claim 6, wherein said merging device comprises:
Configuration is used for the content of said the 2nd CSS file being inserted in the position of a said CSS file at said predefine label the device of a said CSS file.
8. equipment as claimed in claim 6, wherein said merging device comprises:
Configuration is used under the situation that does not cover a said CSS file, generating the device of new merging CSS file.
9. equipment as claimed in claim 6, wherein said predefine label is realized by the import statement.
10. equipment as claimed in claim 6 also comprises:
Path converting device, the relative path of the uniform resource position mark URL that configuration is used in response to said merging said the 2nd CSS file being comprised is changed.
CN2011100351413A 2011-01-28 2011-01-28 Method and equipment used for merging cascading style sheet files Pending CN102622376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100351413A CN102622376A (en) 2011-01-28 2011-01-28 Method and equipment used for merging cascading style sheet files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100351413A CN102622376A (en) 2011-01-28 2011-01-28 Method and equipment used for merging cascading style sheet files

Publications (1)

Publication Number Publication Date
CN102622376A true CN102622376A (en) 2012-08-01

Family

ID=46562299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100351413A Pending CN102622376A (en) 2011-01-28 2011-01-28 Method and equipment used for merging cascading style sheet files

Country Status (1)

Country Link
CN (1) CN102622376A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312803A (en) * 2013-06-17 2013-09-18 杭州华三通信技术有限公司 Method and device for optimizing Web access experience
CN103530160A (en) * 2013-10-21 2014-01-22 迈普通信技术股份有限公司 Page loading method and device
CN104063431A (en) * 2014-06-10 2014-09-24 百度在线网络技术(北京)有限公司 Method and equipment for processing static resources
CN104063401A (en) * 2013-03-22 2014-09-24 阿里巴巴集团控股有限公司 Webpage style address merging method and device
CN104978341A (en) * 2014-04-08 2015-10-14 北京奇虎科技有限公司 File processing method and equipment, and network system
CN105989126A (en) * 2015-02-15 2016-10-05 阿里巴巴集团控股有限公司 Webpage displaying method and device
CN105989098A (en) * 2015-02-12 2016-10-05 阿里巴巴集团控股有限公司 Method for generating icon pack, server, method and system for processing icon
CN111898051A (en) * 2020-07-23 2020-11-06 平安证券股份有限公司 CSS style simplifying method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564976A (en) * 2001-10-04 2005-01-12 皇家飞利浦电子股份有限公司 Method of styling a user interface and device with adaptive user interface
CN1826600A (en) * 2003-06-30 2006-08-30 国际商业机器公司 A method and system for improving presentation of html pages in web devices
CN101512483A (en) * 2006-06-29 2009-08-19 谷歌公司 Dynamically generating customized user interfaces
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564976A (en) * 2001-10-04 2005-01-12 皇家飞利浦电子股份有限公司 Method of styling a user interface and device with adaptive user interface
CN1826600A (en) * 2003-06-30 2006-08-30 国际商业机器公司 A method and system for improving presentation of html pages in web devices
CN101512483A (en) * 2006-06-29 2009-08-19 谷歌公司 Dynamically generating customized user interfaces
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
TUAN: "回复9#yoom的帖子", 《蓝色理想BBS.BLUEIDEA.COM/THREAD-2977858-1-1.HTML》 *
严加琼: "探析CSS样式表的不同用法", 《电脑学习》 *
巩恩伟: "CSS的使用及命名原则", 《科技资讯》 *
张瑞娟: "浅谈网页制作中css样式的应用", 《电脑知识与技术》 *
楼建忠: "CSS样式表的创建与使用", 《科技信息》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063401B (en) * 2013-03-22 2018-02-02 阿里巴巴集团控股有限公司 The method and apparatus that a kind of webpage pattern address merges
CN104063401A (en) * 2013-03-22 2014-09-24 阿里巴巴集团控股有限公司 Webpage style address merging method and device
WO2014153457A1 (en) * 2013-03-22 2014-09-25 Alibaba Group Holding Limited Merging web page style addresses
CN108595468A (en) * 2013-03-22 2018-09-28 阿里巴巴集团控股有限公司 A kind of acquisition methods of web data, device, server, terminal and system
US9563611B2 (en) 2013-03-22 2017-02-07 Alibaba Group Holding Limited Merging web page style addresses
CN103312803B (en) * 2013-06-17 2016-07-13 杭州华三通信技术有限公司 Optimization method and device are experienced in a kind of web access
CN103312803A (en) * 2013-06-17 2013-09-18 杭州华三通信技术有限公司 Method and device for optimizing Web access experience
CN103530160A (en) * 2013-10-21 2014-01-22 迈普通信技术股份有限公司 Page loading method and device
CN104978341A (en) * 2014-04-08 2015-10-14 北京奇虎科技有限公司 File processing method and equipment, and network system
CN104063431A (en) * 2014-06-10 2014-09-24 百度在线网络技术(北京)有限公司 Method and equipment for processing static resources
CN105989098A (en) * 2015-02-12 2016-10-05 阿里巴巴集团控股有限公司 Method for generating icon pack, server, method and system for processing icon
CN105989098B (en) * 2015-02-12 2020-04-07 阿里巴巴集团控股有限公司 Icon package generation method and server, and icon processing method and system
CN105989126A (en) * 2015-02-15 2016-10-05 阿里巴巴集团控股有限公司 Webpage displaying method and device
CN105989126B (en) * 2015-02-15 2019-10-01 阿里巴巴集团控股有限公司 A kind of Webpage display process and device
CN111898051A (en) * 2020-07-23 2020-11-06 平安证券股份有限公司 CSS style simplifying method and device, electronic equipment and storage medium
CN111898051B (en) * 2020-07-23 2023-08-15 平安证券股份有限公司 CSS style simplifying method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102622376A (en) Method and equipment used for merging cascading style sheet files
CN108156022B (en) Service calling method and device and electronic equipment
US7870482B2 (en) Web browser extension for simplified utilization of web services
CN102637135A (en) Method and device for compiling CSS (cascading style sheet)
US20140033010A1 (en) Method and system for dynamic assembly of form fragments
CN109388396A (en) Page generation method, device, computer equipment and storage medium
US11677809B2 (en) Methods for transforming a server side template into a client side template and devices thereof
US20130198613A1 (en) Methods for tranforming requests for web content and devices thereof
US9141596B2 (en) System and method for processing markup language templates from partial input data
CN106997298A (en) A kind of application resource acquisition methods and device
CN103955367A (en) Method and device for generating pages
US7401325B2 (en) Method and apparatus for a configurable Java Server pages processing framework
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
US20160012145A1 (en) Client-Side Template Engine and Method for Constructing a Nested DOM Module for a Website
CA2846581A1 (en) Data infrastructure for providing interconnectivity between platforms, devices and operating systems
CN108241902A (en) A kind of Web projects and performance optimization method
WO2016005884A2 (en) Javascript-based, client-side template driver system
CN111723314B (en) Webpage display method and device, electronic equipment and computer readable storage medium
CN110059278A (en) Web page configuration method, server and computer readable storage medium
CN102253986A (en) Method and device for improving webpage displaying effect in multiple terminals
CN102955852A (en) Method, device and equipment for webpage resource processing
CN103347069A (en) Method and device for realizing network access
JP2009031960A (en) Technology for relaying communication between client device and server device
US20160012023A1 (en) Self-Referencing of Running Script Elements in Asynchronously Loaded DOM Modules
CN111124924B (en) API deployment method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120801