How To Avoid Traffic Drop During Website Redesign

Change is the only constant in life. No matter how smartly you have designed your website, after a couple of years you will need to change it. People tend to avoid change because it scares them and business owner more so. Can you imagine the drop in traffic that would occur while the redesign was in process? Have you considered though the amount of loss you might be making not updating your old website? It seems like a catch-22 situation. You could end up in a large loop of, we might lose out on customers if we redesign our website. So we must keep it the same, if we keep it the same then we are losing out on customers. We have not updated our website design. Luckily for us, we now have a way to fix and possibly avoid the drop in customers while our website redesign services are in progress.

How Do You Avoid Traffic Drops During Website Redesign?

If you are yet to implement the website redesign process then you can follow the steps mentioned in this blog to have little or no traffic loss as your website redesign service is in progress.

SEO the Redesign Process:

If you do not have an SEO Strategist on your team then you need to get on. An SEO Expert will be able to best tell you design team to avoid design conflicts that could seriously hurt your website traffic. Your design team would be experts in design and UI, but listening to the experts opinion on SEO related topics will certainly help avoid traffic loss. In fact, the suggestions make will help boost your Search Engine Rankings but the rise in traffic as well.

Use your existing Sitemap to Build New Architecture:

You already have a pretty decent foundation for your website. But it needs work. Instead of tearing down the entire building, use the blocks to create a whole new structure. In essence you need to use your existing sitemap to study the current structure of your website. Find out where you can make changes to improve the user experience on your site. In some cases, your URLs and general structure can remain the same. But if your current URLs aren’t set up in a logical way (ex. With relevant subfolders and appropriate page titles), a redesign is the perfect opportunity to fix this issue.

Setup 301 Redirects:

If you do decide to change your site architecture completely ensures to set up proper redirects for your links. One of the most common causes of traffic loss during a website redesign is the loss of proper links to your pages. You might have done a lot of back linking and social media activity. You don’t want to lose out on traffic from those sources because they’re all landing on pages that no longer exist. Even simple chage of structure from www.example.com/webdesignagency-pune/  to www.example.com/web-design-agency-pune/  needs to be properly redirected. No exceptions.

Create A New SiteMap:

Before re-launching your site ensure to generate a new site map and upload it to the backend. A site map basically is to help the google bots effectively crawl your entire website. If you have a small website with less than a hundred pages, you can easily build a sitemap from one of the many sitemap generators found online.

Utilize A Google Analytics Tracking Code:

Once you’re done with the sitemap also make sure to have the new analytics tracking code in place for your site. If your code is missing you will lose of good data and you won’t be able to tell if you have lost traffic during your redesign or not.

CodePlateau one of Pune’s best web design agency has handled several website redesigns for its clients. We are happy to say that we generally manage to keep the traffic drop below 5% (Industry standard is 10-15%). If you are looking for a web design agency in Pune give us a call. We will make sure your precious traffic stays with you.

 

Secret of Colors in Web Design

Secret of Colours

It’s no secret that colours are everywhere and we use them without much thought. What is a secret is that brands use the secret of colours to their advantage. Your mind processes a lot of information very rapidly.Continue reading

How to Pick Your Web Design Agency

Importance of Web Design

As we have mentioned several times your web site is the first impression that your customer has of you. It’s imperative that you make a good first impression. The look and feel of your website will determine how long the customer will stay on your site. Continue reading

Common Web Design Mistakes to Avoid

Web Design Mistakes To Avoid

A lot of companies are using the internet marketing model for their businesses and in this day and age it makes complete sense. With the rapidly evolving internet speeds and the thirst for knowledge building among the youth. They want to use the internet for work as much as they do for pleasure. Continue reading

Why Mobile App development is a Must

Invest in a Mobile app?

Businesses are looking at different ways of getting ahead of the competition. Social Media, Google Search Results, Offline Advertising, Online Advertising are just a few ways that companies are trying to get attention. Continue reading

What is a SQL injection and how to fix it ?

What is a SQL injection?
SQL injection is a technique where malicious users try to “inject” his harmful/malicious SQL code into someone else’s database, and force that database to run his SQL. This could potentially ruin their database tables, and even extract valuable or private information from their database tables.

In simple word – An SQL Injection can destroy your database.

So how do users/hackers do this? Best way to show with an example.

Example of SQL injection

1) Based on 1=1 is always true

Let’s say that the original purpose of the code was to create an SQL statement to select a user with a given user id.

If there is nothing to prevent a user from entering “wrong” input, the user can enter some “smart” input like this:

based-on-1-1


SELECT * FROM Users WHERE UserId = 105 or 1=1

The SQL above is valid. It will return all rows from the table Users, since WHERE 1=1 is always true.
Does the example above seem dangerous? What if the Users’ table contains names and passwords?

A smart hacker might get access to all the user names and passwords in a database by simply inserting 105 or 1=1 into the input box.

2) Based on “”=”” is always true

based-sql-injection


sql = "SELECT * FROM Users WHERE Name ='" + uName + "' AND Pass ='" + uPass + "'"

A smart hacker might get access to user names and passwords in a database by simply inserting ” or “”=” into the user name or password text box.


SELECT * FROM Users WHERE Name ="" or ""="" AND Pass ="" or ""=""

The result SQL is valid. It will return all rows from the table Users, since WHERE “”=”” is always true.

3) Based on Batched SQL Statements

Most databases support batched SQL statement, separated by semicolon.

sql-injection

The code at the server would create a valid SQL statement like this:

SELECT * FROM Users WHERE UserId = 110; DROP TABLE Suppliers -- Boom! Table dropped

The SQL above is valid.It will delete table Suppliers.

How to prevent a SQl injection

1) Filter Input- Stop believing your user. The biggest threat to the application is from its users. Users need not be well mannered and obedient as you are expecting. Some users have really bad intentions and some simply try to test their hacking skills. Whatever code you are going to write, write it using the best practices and consider the security aspects of it. Validate every field in the form

2) Use database wrapper classes or PDO
Database wrappers or PDO (in PHP) can reduce the risk of direct access of the input values to the database.
Prepared statements can be used along with PDO as shown below.


$stmt = $conn->prepare("INSERT INTO tbl_user VALUES(:id, :name)");
$stmt->bindValue(':id', $id);
$stmt->bindValue(':name', $name);
$stmt->execute();

CodePlateau Technology Solutions is a professional website development company in Pune, India. User privacy is of paramount importance in todays environment. Having hackers be able to steal you data is a serious NO-NO! For Safe and Securely developed Website Development get in touch with CodePlateau today.

How session works in web application?

What is session?

A session is a way to store information (in variables) to be used across multiple pages.

Why we need a session?

Generally, when you work with an application, you open it, make some changes, and then you close it. This is much like a Session. The computer knows who you are. It knows when you start the application and when you finish. But on the internet, there is one problem: the web server does not know who you are or what you do, because the HTTP address doesn’t maintain state.

Http is stateless that’s why we need session to know web-server that the request is from the same user or from different.

How session works?

Let’s see a real time example – You login to Gmail, it displays Emails of your inbox not someone else. So it means, after login, when you send a request, the server identifies you. And you know, thousands of users may be visiting their inbox at the same time. But server never makes a mistake to serve user A the emails of user B. So how server identifies a particular user?

When the user fill login form and submit, the server authenticates the user and store your identification information in the session. It creates a new session (Map of key values), a new session ID is generated which is used to identify the created session. So if there are 10000 active sessions, there must are 10000 session IDs.

What the server does is, it sends the Session ID to the browser in a cookie. When a new request comes, the server checks a particular cookie that contains the Session ID. If it is found, the server use it to retrieve a particular session object already created at server side. And server link this session object with the current request, so that during the request processing, programmers can make updates to the session object.

Where the session information is stored?

The session information is stored on the server. Only the session Id is sent browser, which it sent back to the server, so that the session object can be identified.

What is a cookie?

Cookies are usually small text file, that stored on your computer’s browser directory.

Can session work without cookies?

This is a great interview PHP question and asked in almost every interview. So the answer is YES, session can work without cookies.
PHP does two things in order to work without cookies:

1) For every HTML form that PHP is find in your HTML code

PHP will automatically add a hidden input tag with the name PHPSESSID right after the form tag. The value of that hidden input tag would be whatever value PHP assigns your session ID. So, for example, the hidden input could look something like this:


<form>
<input type=”hidden” name=”PHPSESSID” value=”12345678″ >
</form>
</code>

This way, when the form is submitted to the server, PHP will be able to retrieve the session identifier from the form and will know who it is communicating with on the other end, and will also know which session to associate the form parameters with if it is adding the form parameters to the PHP session.

2) PHP will find all the links in your HTML code, and will modify those links so that they have a GET parameter appended to the link itself. That GET parameter will also have the name of PHPSESSID, and the value will of course be the unique session identifier – so the PHP session ID will basically be a part of the URL query string.

So, for example, if your code has a link that originally looks like this:

<a href=”http://www.example.com”>Go to this link><a/>

When modified by PHP to include the session ID, it could look something like this:


<a href=”http://www.example.com?PHPSESSID=72aa95axyz6cd67d82ba0f809277326dd”>Go to this link</a>

What is a disadvantage of using PHP sessions without cookies enabled?

A disadvantage is that using PHP sessions without cookies is the fact that if you share a URL that has the PHP session ID appended to it with someone else, then they could potentially use the same exact session that you were using. It also opens you up to session hijacking – where a user’s session is deliberately stolen so that a hacker can impersonate you and do some damage.

How to program session in php?

A session is started with the session_start() function and Session variables are set with the PHP global variable: $_SESSION.

Let’s see the Example for storing values in session


<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
// Set session variables
$_SESSION[“id”] = “1”;
$_SESSION[“name”] = “sandeep”;
echo “Session variables are set.”;
?>

</body>
</html>

Example for getting PHP Session Variable Values


<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
print_r($_SESSION);
?>

</body>
</html>

Example to destroy session

<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
// remove all session variables
session_unset();

// destroy the session
session_destroy();
?>

</body>
</html>

 

CodePlateau Pune’s ultimate solution in affordable and professional Web Development Service uses the blog and all its other resources to answer all the questions you might have. If you have any queries regarding web development, web design or mobile app development, get in touch with us today!

Why you should learn closure in php?

Web Development Tips

Closure is introduced in php 5.3 version. In this post we see what is closure, how to use and how it is useful for web application.

Before going to into definition and examples. Let’s see some other related terms.

Anonymous Function: A function without name is called anonymous Function. If you are from JavaScript programming backgrounds, then you must be familiar with this. This is useful to useful to define in-line function.See the below code.


// A regular function

function temp()
{
echo “Hello anonymous function”;
}

echo temp();

// Anonymous function -A function without name

function(){
echo “Hello anonymous function”;
}

// Closure & Lambda example

$temp = function(){
echo “Hello anonymous function”;
}
echo $temp();
//output – Hello anonymous function

 

In above example, anonymous function is assigned to $temp variable and then this $temp is called as function.

What is Closure?

– Closure is nothing but an object representation of the anonymous function
– The above anonymous function example, we just saw, actually returns a reference to Closure object, not only a function reference.
– Closure and Lambda are same apart from it can access variables outside the scope that it was created.


//set user name
$user = “John”;

// Create a Closure
$greeting = function() use ($user) {
echo “Hello $user”;
};

$greeting();

// Returns – “Hello John”

In the above example you have seen we closure access $user inside the function.

You can also change the $user variable within the Closure, it would not affect the original variable. To update the original variable, we can append an ampersand. An ampersand before a variable means this is a reference and so the original variable are also updated.


$i = 0;

$closure = function () use (&$i)
{
$i++;
};

$closure();
// The global count has increased
echo $i; // Returns 1

Closures are also useful when using PHP functions that accept a callback function like array_map, array_filter, array_reduce or array_walk.

The array_walk function takes an array and runs it through the callback function.


$users = array(“jay”, “amol”, “santosh”, “girish”);
// Pass the array to array_walk
array_walk($users, function ($name) {
echo “Hello $name<br>”;
});
// Returns
// -> Hello jay
// -> Hello amol
// -> ..

PHP Web Development is one of the highly sought after skills from the CodePlateau Portfolio.  CodePlateau has a tonne of experience with website development using PHP and it would serve you well to pay heed to what they have to say.

 

Resource:
PHP Manual, Anonymous Functions
PHP Manual, The Closure Class
PHP Wiki/RFC, RFC: Closures Object Extension