How to Optimize Your Single Page Website

What happens when your client decides to create a single page website and ask you to optimize it rather than going with the usual multiple-page architecture? Well, you find yourself in a predicament! It is because if you are not that well-versed with single-page web optimization, you’re sure to end up plucking your hair out of frustration.

After all, one-page websites have always been the victim of non-paginated structures, content relevancy and whatnot! Hence, due to the unfamiliarity with the optimization of such website, people preferred to drop the “CHANGE” all together and opt for the traditional site architecture.

However, things have changed now! Since the search engine giant, Google, has now become more developed, intelligent and smart over the years, it has finally acknowledged the existence of single-page websites. Consequently, it has done some updates to its crawlers and algorithms, which is why we are seeing a plethora of well-designed and well -ranked one-page websites on SERP, these days.

In this article, I’ll give you a detailed tour of what goes behind the optimization of these websites and how you too can get started. Let’s see:

Pagination is The Way to Go

Googlebots, aka web crawlers, tend to favor the paginated structure, which a multi-page, i.e., conventional website already supports by default. But, how do we restructure the format of a one-page website? By making sure that we don’t leave our site without any organized pagination.

To paginate the structure of your page, you need to create clear and distinct sections, each of which serving a specific purpose. This also makes navigation a lot easier. Plus, you may define a suitable keyword to each section and optimize it for that section. For instance, you may use a keyword for a specific section’s headline or h1 tag, body content (copy), image alt tag, etc. and use a different keyword for the second section’s content, and so on.

Employ DIVs to Paginate Content

The best way you may go about separating and classifying each section on a one-page site is by assigning a separate <div>.

Guide to Responsive Web Design

Responsive web design has changed a lot over the last few years. Front end development teacher, Nick Pettit updates you on all that’s changed when it comes to making websites work on mobile devices.

Responsive web design is a technique for building websites that work on mobile devices, tablets, and desktop screens. Not long ago, websites were typically designed specifically for laptop and desktop screen resolutions. This worked fine until the advent of web capable smart phones and tablets. Web designers approached the new challenge with a myriad of solutions, but the clear winner was Ethan Marcotte’s seminal article on Responsive Web Design back in May of 2010.

Responsive web design has changed a lot since then, and it even evolved in just the last two years since I wrote my beginner’s guide to responsive web design. Whether you’re totally new to web design or if you need to learn what’s new, this guide will help you catch up with the present.

What is Responsive Web Design?

For all that’s changed, it’s amazing how much has stayed the same. The basic principles of responsive web design that Ethan wrote in his article are just as relevant as ever.

As I mentioned in the introduction, responsive web design solves the problem of making the same code work across multiple screen resolutions. Many modern websites are responsive, and in fact, the Treehouse Blog is one of them. If you resize your browser window, you’ll see the screen elements resize themselves like so:

Screenshot of this blog at a mobile size, tablet size, and desktop size. In each instance, the page elements have visually rearranged themselves to be optimal for the display.

There’s a myriad of web capable devices already available, and there are new form factors every day, so it’s impossible to target each individual screen. Instead, it’s better to let the website respond to its environment and adapt fluidly. One of my favorite quotes from Bruce Lee sums up this way of thinking.

“Empty your mind, be formless, shapeless — like water. Now you put water in a cup, it becomes the cup; You put water into a bottle it becomes the bottle; You put it in a teapot it becomes the teapot. Now water can flow or it can crash. Be water, my friend.”

– Bruce Lee

Practically speaking, this involves three main principles that come together to form the whole that is responsive design. They are:

  • Fluid Grids
  • Fluid Images
  • Media Queries

Let’s take a look at each one in more detail.

FLUID GRIDS

Traditionally, websites have been defined in terms of pixels. This is an idea that was carried over from the print industry, where a magazine or a newspaper was always going to be the same fixed size. For better or worse, this is not how websites are displayed. Rather, a website might appear in a large format like on a television, or on a very small screen like a smartphone (or even a smartwatch). For this reason, responsive websites are built with relative units like percentages, rather than fixed units like pixels.

If you’re used to designing in pixels, there’s a simple math formula that can help you transition to using percentages. It looks like this:

target / context = result

For the sake of explanation, let’s say that you have a website that has a wrapper containing the site to a width of 960 pixels, and you’re looking at this site in a maximized browser window on a screen that’s 1920 pixels wide. In this case, the width of the browser window is the context and the wrapper is the target. In order for the site to look exactly the same, you can divide the target by the context to get a percentage value.

960px / 1920px = 50%

Now, what about child elements that are nested inside the wrapper element? The same rule applies all the way down. As another example, let’s say that you have a two column layout inside of your 960px wide site. The left column is a sidebar that’s 300px wide and the right column is the main content area at 640px wide. You also want 20px of margin between the two columns. Here’s an image illustrating what that might look like:

Responsive Web Design diagram illustrating a 960 pixel context with a 300 pixel sidebar and a 640 pixel content area

Using the same formula, each part of the site would have the following values:

  • Sidebar: 300px / 960px = 31.25%
  • Main Content: 640px / 960px = 66.66667%
  • Margin: 20px / 960px = 2.08334%

These percentage values can then be used in CSS simply by applying them to the width, margin, and padding properties. Here’s an example I created on CodePen demonstrating what that might look like in HTML and CSS.

FLUID IMAGES

There have been many advances in responsive images (detailed later in this post), but the core idea is that images should be able to shrink within the confines of a fluid grid. This can be done very simply with a single line of CSS code:

img { max-width: 100%; }

This will tell the browser that any images should only ever be as large as their pixel value, which will ensure that the image is never stretched or pixelated. However, if they’re nested inside a parent container that’s smaller than their pixel value, then the image should shrink. So for example, if an image with a width of 800px is placed inside a container that’s only 600px wide, the image will also shrink to be 600px wide. The height will be calculated automatically and will maintain the original aspect ratio.

MEDIA QUERIES

If you take our original two column layout and try to shrink it down to a mobile phone, it’s a bit challenging. Typically smartphones are used in portrait mode, meaning that the screen is taller than it is wide. This lends itself to websites that scroll vertically, but it’s not good for wide layouts with several columns. That’s where media queries come in. Media queries are a CSS technology that have been available in browsers for several years now, and they’re a core component of responsive design. Media queries allow CSS to only be applied when specific conditions are met. For example, you could write a media query that will only applies CSS if the browser reaches a specific width. That means that when a design is too large or too small, a media query can be used to detect the site width and serve CSS that appropriately rearranges the site’s content. Using the previous two column layout as an example, let’s say that we want to move the sidebar up to the top on mobile screen sizes. It’s actually better to do this by creating the mobile styles first and then using the media query to apply styling for the larger size (this is called a mobile first approach, which we’ll dig into more in a moment). The media query to do that might look like this:

@media screen and (min-width: 600px) { /* ...desktop styles here... */ }

Additionally, here’s a modified version of the previous CodePen embed so that you can see what this looks like in context. Please note that unless you resize your browser window to a smaller screen size (or you’re on a mobile device) this will look the same as the previous example.

See the Pen Basic Mobile First Design Example by Nick Pettit (@nickpettit) on CodePen.

At a certain point, any fluid grid layout will start to “break” and no longer look good. For example, if a mobile layout that takes up 100% of the browser width were stretched to a desktop size, the space wouldn’t be very well utilized. The point at which a layout no longer looks good is called a breakpoint. Responsive sites define their breakpoints through a series of media queries. In general, responsive code might look something like this

/* ...mobile styles here... */
@media screen and (min-width: 600px) { /* ...tablet styles here... */ }
@media screen and (min-width: 900px) { /* ...desktop styles here... */ }

This is just a small example. In practice, you might have many more media queries at sizes that are appropriate for your content. While I recommend using your site’s content as a guide for creating these breakpoints, screensiz.es has the best listing I’ve seen of device resolutions, just in case you need it.

Mobile First

Even before the start of the responsive design revolution, the idea of using a “mobile first” approach started to take hold. Mobile first is the idea of designing the smartphone experience first and then working upwards to tablets, desktops, and possibly beyond. In the now famous Mobile First post from Luke Wroblewski, there are several reasons given:

  • Mobile web browsers represent a rapidly growing demographic and will likely eclipse desktop browsing (if it hasn’t happened already)
  • Small mobile screen sizes force designers to focus, because there’s no room for sidebars, ads, social media buttons, and other peripheral content
  • Mobile devices typically have more capabilities than their desktop counterparts, such as touchscreens, GPS, accelerometer data, and more

Designing a responsive site with a mobile first approach is a natural evolution of both ideas. As demonstrated in the previous example, it can be tricky to cram a multi-column layout into a smaller screen space. Instead, it’s much better to start simple, then work upwards to more complex designs. In fact, creating a mobile experience first may benefit the desktop layouts as well, because the user experience will naturally be more focused.

Responsive Front-End Frameworks

Front-end frameworks like Foundation and Bootstrap have been around for some time, but more recently they’ve become responsive frameworks. In other words, their grids have responsive design in mind from the start. This is a huge step forward, because most of the time you don’t need to do any fluid grid calculations at all. Rather, the responsive grids included with a modern front-end framework just works immediately.

As an example, take a look at this template from Foundation:

Screenshot of mobile and tablet/desktop layouts from ZURB Foundation template.

Unless you’re building an extremely simple 1-page website, it’s almost always a smart idea to pick a front-end framework to start out with, even if it’s just for rapid prototyping. The responsive grids in these frameworks are very robust and thoughtful, so there’s no need to “reinvent the wheel” and start over.

Responsive Images

Beyond just multiple screen resolutions, web designers now have the added challenge of multiple pixel densities. Phones, tablets, laptops, and even some desktops, might have 2x or even 3x the number of pixels. In my own opinion, I think the best way to handle high DPI displays is to use an SVG first approach. In other words, anything that’s not a detailed photograph or illustration should be an SVG, because they can scale to any resolution and the file sizes are typically small.

If photographs or any kind of JPEG images are required (and they almost always are), typically you can get away just making them twice the size of their parent container. So for example, if the parent is 400 pixels wide, the image inside should be at least 800 pixels wide. This same trick works for background images when the background-size property is set to 50% or less.

However, if you need something more robust for lots of images, it’s worth investigating newer responsive image solutions. The Responsive Images Community Group has been working towards a client-side solution that comes in the form of both the <picture> element and the srcset attribute for the <img>element. Browser support is still far off, but they also offer a JavaScript polyfill that lets you use these features today.

Xamarin Apps share code across all platforms.

Target iOS, Android, Windows and Mac with a single, shared C# codebase. Use the same language, APIs and data structures on every platform.

C# is the best language for mobile app development.

With Xamarin, you write your apps entirely in C#, sharing the same code on iOS, Android, Windows, Mac and more. Anything you can do in Objective-C, Swift or Java, you can do in C#.

Native UI, native API access & native performance.

Xamarin apps are built with standard, native user interface controls. Apps not only look the way the end user expects, they behave that way too. This can’t be achieved with other solutions.

http://xamarin.com/

Responsive Web Design?

Since its groundbreaking release in 2011,Responsive Web Design remains a fundamental resource for anyone working on the web.

Learn how to think beyond the desktop, and craft designs that respond to your users’ needs. In the second edition, Ethan Marcotte expands on the design principles behind fluid grids, flexible images, and media queries. Through new examples and updated facts and figures, you’ll learn how to deliver a quality experience, no matter how large or small the display.

WHAT’S NEW IN THE SECOND EDITION?

Discover new tips and tricks for browser support, take a closer look at solutions for serving images, explore the role of progressive enhancement in web design, find better methods for managing bandwidth, and more. Follow along with the new examples and approaches Ethan has assembled, and dive in to his meticulously revised code samples.

http://www.webcreativeservices.com/web-design

Structure to web applications by providing models

Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions,views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.

The project is hosted on GitHub, and the annotated source code is available, as well as an online test suite, an example application, a list of tutorials and a long list of real-world projects that use Backbone. Backbone is available for use under the MIT software license.

You can report bugs and discuss features on the GitHub issues page, on Freenode IRC in the #documentcloud channel, post questions to the Google Group, add pages to the wiki or send tweets to @documentcloud.

Backbone is an open-source component of DocumentCloud.

http://backbonejs.org/

Free online advertising tips! Nothing is better than free

You are opening or redesigning your online store. Your new website has been created, what other steps can you take to increase traffic to your website? If you don’t advertise nothing will happen, that is guaranteed

Here at Web Creative Services we will create a site that will speak to your target audience, we will work together with you and we will do a market research to find out what works for you. Our website will have ease of navigation and we will work hard to make sure that your client never has to look for your competitor.

But, what else can you do to increase traffic and visibility to your website? Here are some simple steps to free online advertising:

  1. Ask us about Search Engine Optimization (SEO). Trough the SEO process we will work to increase volume to your website, ensuring that your website will be indexed by the main search engines; therefore increasing your page ranking. Better ranking will mean higher traffic and more business to you, if you are not comfortable doing your self ask us to do it for you. Here is what you should know about SEO.
  2. Have your own blog. People like blogs, they like it when they feel like they are being talked to in a personal level and they have the ability to respond and comment on your blog. Make it interesting and write simple and complex content for all audiences. Your web designer and web developer can include a blog section to your site. Ask us about it.
  3. Make sure you have substantial content that is relevant to your business and your industry, great content is everything in your website, remember to write what people want to read and not what you like to write.
  4. Submit your website to an industry site and/or industry directory. However beware of directories that solicit you for upgraded listings. Make sure the directory is widely used and accepted in your industry. Always affiliate your site with reputable sites, don’t make the mistake of submitting your website to everyone that call be very bad.
  5. Exchange links with other reputable sites that are related to your business, links can bring great amount of traffic to your website..
  6. Utilize media clip websites such as YouTube to market your business. Only link related media that your consumers might find interesting.
  7. Issue a news release. Once your website is complete, send a news release to newspapers or industry periodicals. Find an event that might be newsworthy, write an article related to your business and send it in making sure you include a link to your website. Utilize traditional and web targeted media.
  8. Promote your site on online forums. There are thousands of forums, internet communities, and social networking websites such as LinkedIn, Facebook among many others. Find online communities with serious discussions and make sure you actively participate and advertise your website.

Our web designers and web developers can help you advertise your website, if you need any additional help, please contact us at Contact us

Scroll Top