Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Header bar that doesn't reload with page

Posted on 2014-04-23
8
Medium Priority
?
299 Views
Last Modified: 2014-04-28
I'm trying to figure how to make the header of my page not reload when browsing the site.

An example of what I'm trying to accomplish is the play bar: http://sverigesradio.se

Any plugins or ideas on how that's done?
0
Comment
Question by:Nathan Riley
  • 3
  • 3
8 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 40018963
server side send only the right part not the header

<body>
<header>
<!-- your header here -->
</head>
<div id="mybody"></div>
</body>

Open in new window

with :

var id = "1";
jQuery("#mybody").load("serverside.php?chunk_page_id="+id);

Open in new window

0
 
LVL 12

Author Comment

by:Nathan Riley
ID: 40019154
Not sure I understand the above solution.

Could you explain further?

So the non-reloading div would be #mybody?
0
 
LVL 83

Expert Comment

by:leakim971
ID: 40019619
no it's the header

#mybody get the "new" page calling serverside.php
serverside.php receive a parameter : chunk_page_id
to know which page to send (echo)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40020070
No points for this, please, but this design is showing up more and more.  Google has been using it for a couple of years.  Because it uses JavaScript (jQuery) and CSS to create the visual rendering of the web page, it makes programmatic "web scraping" of the content more difficult, thereby protecting the content a little better from script kiddies who would steal without respect to intellectual property rights.
0
 
LVL 12

Author Comment

by:Nathan Riley
ID: 40020222
Gotcha, so this would be more complicated to add to an existing website then as the entire current page has to be loaded this way while the header is static.  

Are there any performance issues with doing this on bigger sites?  I guess not if google does it?
0
 
LVL 83

Expert Comment

by:leakim971
ID: 40020392
The issue is about SEO
Your site will load faster
0
 
LVL 12

Author Comment

by:Nathan Riley
ID: 40024598
Ah meta descriptions and such need to be defined outside of the load then?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question