Speed up Page Load by reducing HTTP requests with PHP
A nice technique to speed up your page loading times is to try to reduce the amount of calls your browsers has to make to the server. This will be every image, every css and every JavaScript file included in the webpage. Each time you want to load in one of these elements you will be sending a request to the server which will return the requested object known as a HTTP request.
Reduce Page Loading Time With PHP
Each one of these uses up time on your page loading, so to reduce page load all you have to do is reduce the amount of calls being made. But what if you want to organise you JavaScript files, jquery file, general file, application file and page file. There could be upto 4 requests for some javascript for the page.
It is possible in PHP to combine these JavaScript files together and trick the browser into thinking they are just one JavaScript file, therefore reducing the amount of calls being made to the server. This is done by reading the JavaScript with PHP then changing the header to JavaScript like the example below.
Create a PHP file and use the readfile function to bring in your Javascript files then change the header to Javascript and the server will treat this page as Javascript.
readfile(jquery.js'); readfile(general.js'); readfile(jquery-ui.js'); readfile(page.js'); header('Content-type: text/javascript'); The above technique can also be used with CSS files or a combination of them both.
Ouch! I’ve Been Banned By Google!
This question has become very common these days. Waking up to find out that your site has disappeared from the rankings of Google is shocking and nothing can be worse than for someone who runs an internet-based business that this. There are certain times when the website does not rank for its own name. These are very clear signs that your site has been banned by Google.
Google does not offer any warnings before it bans your site. You will only be able to find out when the visitors to your site drops considerably. This will be followed by the sales reducing by a high margin. A high percentage of site owners may be left without an understanding of what actually transpired thus scratching their heads and spending sleepless nights about how to get back.
Your site cannot be banned without a reason.
There are certain Google’s rules which when violated, will make your website banned from the search engines.
The possible reasons that may make your site get banned include:
- Meta Tags and Robots: Looking at your robots and Meta tags may be the best way forward since it may be possible that your robots have been set in a way to exclude Google spiders from indexing your site. If your site has a robot .txt file, it would make sense if you look at it. Your Meta tags should never show something like this: < Meta name=”ROBOTS”=cont=”NOINDEX”>
- When this appears on your site, Google will definitely be prevented from ranking to your site. Your choice of a robot code may also lead to your site not being ranked by Google. Ensure that your choice of robot codes is set to allow the search engine spiders visit all your web pages.
- Cloaking: You must have heard about cloaking, right? This is a term used to describe a site that sends web pages that have been altered to search engines that crawl the sites. You will note that when different content is returned to the users than what is returned to the search engines with the aim of causing some distortion in search engine rankings. This is one of the malpractices that can have your site banned from Google rankings. Google tries as much as possible to ensure that the quality of the search results is not only consistent but also of high quality. Any site which is involved in cloaking may be banned by Google permanently.
- So when your website displays different information for a real person and for search engine spiders, your site is said to be cloaking. The cloaked pages are keyword-packed with the intention of displaying different information, which will make it get ranked highly. If you have a site and have included such manipulations, it is high time that you stop. Failure to do this will have your site banned by Google.
- Duplicate websites and content: Creating content for websites is not an easy task. A site that has duplicate content is penalized by Google. You may have your site banned when someone copies your content, which was original. It is thus important to monitor your content and make sure that noother site is using them. This can be done by carrying out a Google search by using a few of your quotation marks around the content/ (“). If you find out that someone has copied your content; you will find it necessary to visit http://www.google.com/dmca.html where you’ll be able to learn more about infringement of copyrights. If your content has been copied without your knowledge, it may be necessary that you check http://www.copyscape.com.
- Presence of hidden links or texts: There are many ways that you can have a text hidden. Some of the methods that are used are sneakier than others. When a link or a text is not visible to a human being but only to a search engine spider, it is considered to be hidden. Texts can be hidden by using white and text colors on a white background or making use of cascading style sheets to hide the texts. When this is done, it’s just a matter of time, and you will have your site banned by Google.
- Spamming or stuffing of keywords: Google allows up to a maximum of 5 percent of keyword density in the content that appears on your site. There are certain web pages that have been stuffed by keywords unnecessarily. It is important that you use your keywords the right way.
- Buying links: Buying links will deal a huge blow to your Google rankings. It may not get your site banned, but you will drop down in your Google rankings. Your investment in getting links faster will be a waste. To move up the Google rankings, you may consider staying away from buying links.
- Creating doorway redirects: Sites that have created sneaky redirects risk getting banned by Google. When its spiders locate such mistakes in your site, it will definitely get banned.
How to get back into Google rankings
Google states that site owners should not make use of sneaky redirects, hidden links or texts and also avoid loading your web pages with words that are irrelevant. Sending automated messages to Google from your website is not acceptable. Furthermore, doorway pages that have been created for the search engines and not for website users should not be part of your site.
To get back into the ranking list, you should ensure that you have checked your sites for the above ethical malpractices and make the necessary modifications. You will need to do this since, even if you resubmit the site for consideration, chances of being rejected are higher.
If you would like to resubmit your site for re-inclusion ion Google rankings, you will need to log into the Google’s Sitemaps which will take you to the bottom of your account page. You will see “Submit a re-inclusion request”. This will direct you to this link:https://www.google.com/webmasters/sitemaps/reinclusion?hl=en
What does this mean?
Well,you will have to register your website to be considered for reinclusion. After you’ve done this, you will check boxes that will not only you agree to being guilty of the mistakes you committed but also agree to making modifications also a box to promise that you will not commit the mistake again.
There is a box that will allow you to explain yourself. In this space, you will need to include everything that you believe will get your site ranked.
After you have gone through this procedure, Google will send its spiders to your site again to check if your site has been cleaned. It may take a few months to get indexed and during this waiting period, you should not tamper with your site not unless it is very necessary.
After you have done the above, it does not hurt sending Google an email. It is not necessary but it may help get things done faster.
Got comments? had similar experience? please comment and share your knowledge! Contact me : bhavinrana07[@]gmail.com
Importance of PHP Development for Web development
Keeping in view the complex nature of PHP web development, hiring of highly skilled and experienced PHP developers becomes extremely crucial. Several benefits of hiring a PHP developer include reducing development cost since PHP also integrates with a number of open source applications like Joomla, Drupal, WordPress etc. Being an open source technology it allows the user to make use of all platforms like Apache, Solaris, windows, Linux and various other platforms in order to take advantage of the investments made.
When you hire PHP developer you should care to find if he or she knows how effectively the XML is supported with 5th version. Now XML files work unified way and the efficiency of processing data has become compatible with W3C school specification. With SimpleXML in support 5th version has made parsing RSS files, REST results too much easy.
However it is also very important to note that in order to use PHP in an efficient way PHP tools are required. PHP tools are divided into different categories depending upon their functionality. For e.g. Webgrind is a debugging tool whereas PHP/SWF Charts is an outstanding tool for image manipulation and graphs.
How to Translate Text to desired language ?
Just follow these steps and copy & paste the code you can translate text easily.
Step 1 : Make a div with id (id is compulsory)
Like <div id="content">Loading…</div>
Step 2 : Paste the following code to head section under script tag of your webpage.
google.load(“language”, “1″);
function initialize() {
var content = document.getElementById(‘content’);
// Setting the text in the div.
content.innerHTML = ‘<div id=”text”>Place Your Text Here (Hola, me alegro mucho de verte.)<\/div><div id=”translation”/>’;
// Grabbing the text to translate
var text = document.getElementById(“text”).innerHTML;
// Translate from Spanish to English, and have the callback of the request
// put the resulting translation in the “translation” div.
// Note: by putting in an empty string for the source language (‘es’) then the translation
// will auto-detect the source language.
google.language.translate(text, ‘es’, ‘en’, function(result) {
var translated = document.getElementById(“translation”);
if (result.translation) {
translated.innerHTML = result.translation;
}
});
}
google.setOnLoadCallback(initialize);
Step 3 : And the final Step is paste the following URL in src of script tag.
http://www.google.com/jsapi?key=AIzaSyA5m1Nc8ws2BbmPRwKu5gFradvD_hgq6G0
Above example is translating Spanish to English You can translate as your choice.
Just change the code in
google.language.translate(text, ‘es’, ‘en’, function(result)
es stands for Spanish,
en stands for English
You can find more language code at http://code.google.com/apis/language/translate/v1/reference.html
How to get number of days between two dates using MySQL
While developing web application , in many many places we face the problem where we can use only MYSQL and get the number of number of days between two given dates using MySQL. Syntax – DATEDIFF(FirstDate,SecondDate) This function will calculate the difference bretween two dates and give the out put in number of days. It will give the result positive only if first date is grater than second date. If Second date is greater than First date than it will give the negative result.
Recent Comments