Both of them are used in totally different context.
onload is an event
location.href is a property
*window.onload*
This event is used if you want to take some action the moment page content gets loaded entirely(this includes all your elements,images etc etc).So you can assign any function according to your functionality if your project demands some action after content is loaded.
*window.location.href*
This is used for REDIRECTION purpose.I will use it only when I want my user to go to some different page.
In your Context
It is pointless to execute window.location.href on window.onload event.If you are not allowing user to spend some time on the onloading page,then I would suggest to directly load the page that you are including in
window.location.href="this url shoulod be loaded directly instead";
why take a longer route when the shorter one is so efficient??