This is an example from Wicked Cool PHP, an very handy book for daily PHP coding.
I am reading this book now. It has 12 chapters, total 76 tips.
Today, I reviewed the whole site with some tools. Then made changes on template files, images file to improve Yinfor.com.
1) I have feed on my web site. So any one want to subscribe can click the icon.
First, I check the feed file. Found it has some errors. So, I fixed it and check it with W3C Validation service.
Now it is
2) I put Facebook like button on entry page before. Later I removed it and replace it by a social service, named AddThis.
When I review HTML code, I found some leftover on pages. So I clean the code at templates. Then rebuild the site.
3) Since I mentioned AddThis service, I used Share Buttons codes on two places per web page. One is just below the post title. The other one is next to my related posts section. To improve the load speed of web pages, I replaced the Share Buttons by Smart Layers. It is one piece code, mobile ready. I copy and paste the code just in front of the ending body tag. Now you can see three places with different functions. On the left, there are five button to share the post. On the up right corner, there are four icons, including Facebook, Twitter, linkedin, and Google Plus. These icons are link to my profile page of these Social Network.
And the last, on the bottom of the webpage, recommended content are provided from my blog.
It is the first day of my Two Week Campaign. It is very important to start everything correct in the beginning.
The changes I made is based on the following concept.
Audience always likes faster web site. Audience always likes web site shown without errors.
First of all, my small job is to make my web page loading faster.
1) Combine CSS files and do not use @import to include other css file
2) Optimize Images on homepage. Got 5% reduction on image size.
4) Minify CSS file, it cut 9KB
5) Leverage browser caching of static assets. Such as jpg, png, gif files. I make them expired in 60 days.
The overall effects are: less connections, smaller files.
I make a web form which have about 25 fields. Including date, text, number. I need a tool to doing the client side data validation.
Because I am learning jQuery. So I decide to go to jQuery official site. I think there may be some plugins.
Actually there are lots plugins related to form validation.
I chose the Validation.
It is preaty simplay when I need to validate some fields.
The code is: