Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

When creating a website, when should you load partial view and when should you do a complete page refresh?

I was looking at github's site and noticed that pretty much the only place they do partial loading is in a project's folder area. I could see a couple places where they could have but didn't(tab navigation: feed, your actions, ...). But, Google plus does partial loads for search, and clicking on any of the header navigation buttons (pictures, games, circles, ...).

Why would you not do partial loading if the main container stays the same and the content is the only thing that is changing?

share|improve this question
    
You should do partial loading everywhere as long as it's a better user experience. Note that doing partial loading requires writing and maintaining more code. –  Raynos Dec 16 '11 at 21:21

6 Answers 6

My first advice is when the action suggests it, use navigation. This doesn't tell a lot but think of nav buttons or links to articles from the same page, etc where users intuitively awaits full navigation responses.

Partial page request are for places where a new rendered page is too much, like photos slides, little pieces of information, or adding a post like here. You wouldn't expect a PPR when clicking on a stackexchange question but you do when voting up a question.

In addition, PPR and browser history is sometimes difficult to implement. Don't work in vain when users won't expect, need or appreciate partial loading.

share|improve this answer

For SEO purposes too. If you want to have one page for everything, google will think that your site consists of one page. Not good. Better to have separate pages with good tags.

share|improve this answer

I think partial loading is for improving user experience. For me I think you should use partial loading when ever you think partial loading will improve initial page loading. Also, partila loading should be used in places where you don't want users to be inconvinienced with full page reload. Where to and where not to use, mainly depend on your site userbility, sites with a lot of user interaction might benefit more from partial page loading. The fact that certain big did or did not use partal loading does not make it right or wrong to use it to your site.

share|improve this answer

When it's better for the user, costs can be justified, and the additional time on the project can be justified. You have to look at how much time you have, how much the additional time will cost and weigh it against the benefit to the user experience and to the value that it provides to the company.

If cost/time has no meaning (and it always should) then wherever the experience can be improved it should be improved.

Specifically to your question...

Why would you not do partial loading if the main container stays the same and the content is the only thing that is changing?

When the additional time/costs don't make sense for the added improvement. There is going to be more code and more maintenance.

share|improve this answer

I use a simple rule of thumb:

If the data's dynamic, then partial loading should be used where possible. If the data's static, then a full page load is probably better. This is better for SEO purposes, too.

Basically it comes down to a static vs dynamic thing for me. I don't really see the point in allowing dynamic loading of two completely different data sets (for example through clicking a menu item / tab option).

share|improve this answer

There's no downside to partial views when implemented correctly.

If SEO is important, you do need a separate URL for each page to be indexed and show up in search results. However, there's a way to go around this using the new navigation history framework (HTML5), and some tweaking for Internet Explorer (IE):

The idea is to change the URL dynamically when a partial view is loaded, and to complement this, you design things so that a URL determines the partial views to load, therefore building the whole page just like it would have happened through user interaction.

This pattern allows both SEO and partial views to co-exist in harmony, and allows the user to user the back and forward navigation buttons.

Then all you need is to make all those URLs accessible to crawlers, either through a site map page, a sitemap.xml file, or by uploading all URLs to Google.

The pattern can be implemented easily in most popular browsers. For most versions of IE, Javascript libraries exist to update IE's navigation history using an IFrame and the URL's hash (#).

As @TomasAlabes says, there are certain user actions that suggest navigation, and the user will expect a complete page reload. However, even if just a few elements of the page will stay the same (e.g. header and footer), partial views will still reduce network traffic and user wait time.

No downside!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.