I was amazed when see a web site loading. Visit www.m4marry.com This site will load in amazing speed even if it had big size. How we can do that... Anyone had any idea ? Please reply...
I am sorry if the post is in the wrong place
thanks
Rajeesh

Most likely those "pages" are pre-generated and then accessed statically (although I didn't look at them, but if they are suppossedly "huge", and still load in the millsecond to 2-3 second range, then this is about the only possibilty).

Well to start off with it uses a CDN. Something like the webhosts will have thousands of servers all over the world. The will also use compression (Google GZip Apache). As well as E-Tags, Cache Control, Expires and Minified content.
Just look up those things
Regards,
Sam R
P.S. This should have been in the Apache forum really but oh well

Well to start off with it uses a CDN. Something like the webhosts will have thousands of servers all over the world. The will also use compression (Google GZip Apache). As well as E-Tags, Cache Control, Expires and Minified content.
Just look up those things
Regards,
Sam R
P.S. This should have been in the Apache forum really but oh well

There are a few PHP tools that enable this.

eg:

PHP Speedy: http://aciddrop.com/php-speedy/
Speedy for Joomla: http://code.google.com/p/joomla-php-speedy/
Minify: http://code.google.com/p/minify/

These will automatically parse PHP output and minify HTML, CSS, JavaScript as well as set HTTP Cache Headers, Gzip etc.

Apache can be set up to do most of this anyway, and is more efficient at it. Apart from minifying content. Probably would be a great module for Apache.

Its best in apache config
but if your host does not allow access
it can be done in php

<?php header ('content-type: text/css'); /* text/javascript text/javascript etc */
/* file data */
<?php ob_flush(); ?>

can be any file type
this is part of style.css.php

<?php header ('content-type: text/css');
ob_start("ob_gzhandler"); ?>
.rss-box { margin: 1em 3%; padding: 4px 8px; background-color: #ededed; border: 2px dashed #7485CA; }
.rss-title, rss-title a { font-family: "American Typewriter", "Trebuchet MS", Trebuchet, Lucida, sans-serif; font-size: 1em; font-weight:bold; margin: 5px 0; padding: 0; letter-spacing: 1px; }
.rss-items { }
.rss-item { font-family: verdana, arial, sans-serif; font-size: .95em; font-weight : bold; margin: 8px 0; }
.rss-item a:link, .rss-item a:visited, .rss-item a:active { text-decoration : none; border-bottom: 1px solid #edefed; color: #88b; }
@media all { .dontall {display:none; } }
@media print { .dontprint { display:none; } }
@media screen { .dontshow { display:none; } .doshow { display:inline; } }
@media aural { .dontspeak { display:none; } }
table { padding: 1px; }
table.sortable th { background-color: #dedede; }
table.sortable tr.odd td { background-color: #ededed; }
table.sortable tr.even td { background-color: #dedede; }
table.sortable tr.sortbottom td { background-color: #dfdfdf; font-weight: bold; }
<?php ob_flush(); ?>

nearly 85% reduction in text files size

Thinking about this and I wanted some oppinions:
mod_minify; An apache module for minifying CSS, HTML and JS without needing PHP scripting!
What do you all think?

Mod_deflate and mod_gzip already work on all served files if enabled.
Compiled in (99% of installed apache servers probably) & enabled in apache config they will compress all applicable filetypes
php to enable gzip is only neccessary if the host does not provide access to apache configuration, to enable the compression

http://www.websiteoptimization.com/services/analyze/
the url in the op is using mod_deflate enabled in apache

Thinking about this and I wanted some oppinions:
mod_minify; An apache module for minifying CSS, HTML and JS without needing PHP scripting!
What do you all think?

I don't think its available yet. If you get around to writing such an Apache module I'd be happy to help, and use it. I'm sure it will be very useful module.

JSMin C source.
http://www.crockford.com/javascript/jsmin.c

Wouldn't be hard to port to an Apache module:
http://threebit.net/tutorials/apache2_modules/tut1/tutorial1.html

Here is a bunch of perl apache modules that do the same:
http://search.cpan.org/~gtermars/Apache2-Filter-Minifier-CSS-1.04/lib/Apache2/Filter/Minifier/CSS.pm
http://search.cpan.org/~geoff/Apache-Clean-0.05/Clean.pm

There is already a mod_tidy, that mod_minify could be based upon:
http://mod-tidy.sourceforge.net/

Maybe you should start a new thread, in the C section or similar - call it mod_minify development discussion or something like that. :)
Link it from there..

Mod_deflate and mod_gzip already work on all served files if enabled.
Compiled in (99% of installed apache servers probably) & enabled in apache config they will compress all applicable filetypes
php to enable gzip is only neccessary if the host does not provide access to apache configuration, to enable the compression

http://www.websiteoptimization.com/services/analyze/
the url in the op is using mod_deflate enabled in apache

True, but minifying is different from compressing. Though compression generally provides better size reduction, it does involve more computation, both on the server and client. Minified content should be less computation then compression and does not require decompression on the client so does not have the issues involved with that.

It would be very useful for clients with low computing power, such as cell phones, PDAs, etc, or browser that don't support gzip.

It will also benefit to minify before compressing, as compressing does not understand the syntax of what it compresses. Minify removes unnecessary characters before it is compressed reducing the load and improving the compression.

It would also be useful to people who want to make their code more copyright. It makes it a lot harder to read so it has many uses. I'll look into it. If you want me to email you if I ever get round to doing it just PM me with your email address (Don't be stupid and post it in the forum for all the bots to see :()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.