Reduce the weight of stylesheets by 35% at runtime(madskristensen.dk)

submitted by dalzieldalziel(6230) 5 years, 9 months ago

It is always desirable to produce the smallest amount of client-code at any given time. That includes HTML, JavaScript and CSS files. The more client-code you produce, the longer it takes to download and render the web page. This shows how to reduce CSS files by 35% at runtime using C#.

3 comments |category: |Views: 10

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by gavinjoycegavinjoyce(25.7k) 5 years, 9 months ago 0

As has been pointed out by the sole comment on the original article, this implementation has a security hole allowing access to any files on the file system. It also tries to solve a problem that has been solved by using gzip compression in IIS.

Reply

posted by madskristensenmadskristensen(8565) 5 years, 9 months ago 0

The security hole has been fixed. Besides, if you don't have access to the IIS, then this is a very good solution

Reply

posted by mikeonmikeon(5200) 5 years, 9 months ago 0

Besides the point raised by Mads which is valid, does gzip compression support cache or does it compress the data all the time every time?

Reply

information Login or create an account to comment on this story