Minimize HTTP Requests
tag: content
80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster page...
Tuesday, December 27, 2011
Friday, December 23, 2011
Detect load image when change image source
Posted by
Unknown
at
10:35 AM
It's useful when you change image source such as photo slider, when you click thumbnail image, you can show the larger image...
Tuesday, December 20, 2011
Create multi background by css3
Posted by
Unknown
at
8:33 AM
CSS3 allows web designers to specify multiple background images for box elements, using nothing more than a simple comma-separated lis...
Tuesday, December 13, 2011
Detect ajax and render other view in zend
Posted by
Unknown
at
8:49 AM
$request = $this->getRequest();
if ($request->isXmlHttpRequest()){
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer('evencalendarajax');
//this->_helper->getHelper('viewRenderer')->setNoRender();
}
1. get all request
2. check request is ajax request.
3.Disable layout
4. Call another view if you want.
5. Disable view if you don't use vi...
Thursday, November 17, 2011
Create custom router url
Posted by
Unknown
at
3:14 PM
to create friendly url to must using custom router .
This code is really useful for mvc framework like zend, codeignitor,..
This is the cod...
Tuesday, November 8, 2011
Show Related Post in WordPress Without a Plugin
Posted by
Unknown
at
9:01 PM
Related posts is a very popular feature. My default wordpress installation often includes a plugin that has this functionality. There are quite a few plugins that lets you have this featur...
Monday, November 7, 2011
Import data from excel file to database
Posted by
Unknown
at
11:15 AM
Follow this link to show full guide.
l...
news scroller with p tag( simple code)
Posted by
Unknown
at
10:41 AM
Jquery is powerful tool to animate for website display, have plugin support news scroller, hovever almost is very heavy and does't support scroll with p tag.
To day, I guide the way to create news scrolle...
Friday, November 4, 2011
Use cache class
Posted by
Unknown
at
4:44 PM
in previous post, i introduced the technical to cache a objec to file
And in this post, i continue introduce to way to use it.
The fist : thinking the id for cache, this id must be unique, example I have class person and do the list method in this class at page 2 in default modul...
Cache object in php to file
Posted by
Unknown
at
4:29 PM
Cache is the technology to improve your website speed.
To day i will introduce you how to cache the object in you php application.
Note: You should't abuse cache, only use it in common object with the same result...
Saturday, October 29, 2011
Detect ajax request php
Posted by
Unknown
at
12:41 PM
I have one script use for both ajax and normal request.
This code can help you detect ajax request to coding.
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
/* special ajax here */
...
Friday, October 14, 2011
Auto refresh page with header meta
Posted by
Unknown
at
5:10 PM
Meta refresh is a legacy method of instructing a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds. It is also possible to instruct the browser to fetch a different URL when the page is refreshed, by including the alternative URL in thecontent parameter. By setting the refresh time interval to zero (or a very low value), this allows meta refresh to be used as a method of URL redirectio...
Wednesday, October 12, 2011
Embbed pdf for your website without flash
Posted by
Unknown
at
10:29 AM
Today, i found the way to embbed pdf in my webiste and i found many solution.
But the best way use google reader...
Monday, October 10, 2011
Save buffer output in Php
Posted by
Unknown
at
4:46 PM
We all know that PHP is default sending all output to the standard output buffer( the browser in many cases if I can say like that.) That depends off course about your server configurations but that’s how it gets setup into the standard. There is a buffer size set in php.ini; when the output buffer is full, it is automatically flushed and sent to the browser.
Many times in our programming life we wanted to change this standard way and send the contents to a variable instead of printing to the browser...
Thursday, October 6, 2011
Create unique Id sercure with hash
Posted by
Unknown
at
4:09 PM
have many algorithm to generate to unique Id but almost is popular and the result only containt number
This function allow you to unique Id containt leter and number.
More it provide hash to sercure your unique I...
Dropdown for IE6
Posted by
Unknown
at
11:25 AM
Almost modern browser support dropdown menu easy only with css code.
But IE6 not support hover CSS. So this solution will be solved...
Download safe file without error
Posted by
Unknown
at
8:30 AM
When you use header function to download to client.
Sometime happend error because file is interupt.
It cause by many reason: browser, your function and here is the code to solved this proble...
Tuesday, October 4, 2011
Cắt bỏ tiếng việt trong php
Posted by
Unknown
at
3:58 PM
Việc cắt bỏ tiếng việt thực sự cần thiết khi chúng ta tìm kiếm thứ gì đó.
Sau đây là đoạn code để thực hiện điều đ...
Hàm chuyển chuỗi có dấu (Unicode) thành không dấu
Posted by
Unknown
at
2:46 PM
Bài này mình viết hàm chuyển một chuỗi ký tự có dấu (Unicode), chuyển thành chuỗi không dấ...
Subscribe to:
Posts (Atom)