?
Solved

Header bar that doesn't reload with page

Posted on 2014-04-23
8
Medium Priority
?
313 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
7 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

601 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