Solved

Header bar that doesn't reload with page

Posted on 2014-04-23
8
282 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:N R
  • 3
  • 3
8 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 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 11

Author Comment

by:N R
ID: 40019154
Not sure I understand the above solution.

Could you explain further?

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

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 108

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 11

Author Comment

by:N R
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 82

Expert Comment

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

Author Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now