Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:21:26+00:00 2026-05-26T23:21:26+00:00

I want to load in a page a div from an another internal page.

  • 0

I want to load in a page a div from an another internal page.
The div that i want to display is a cart.
I want to show the cart from my shopping website in the header of my blog.

I can use PHP Dom parser or Jquery load.

Which solution is the best (performance, speed to display the content)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:21:26+00:00Added an answer on May 26, 2026 at 11:21 pm

    If you’re concerned about speed, reduce the number of remote calls you have in your application. I write this especially because of this sentence in your question:

    I want to load in a page a div from an another internal page.

    You should not do a remote call here to obtain the scripts output but instead – as long as it’s your code generating that internal page – invoke the code instead directly that generates the HTML.

    Example:

    • Call magneto subroutines to generate the div, as it’s a framework you might be able to create a route for that.
    • Create a template function inside your wordpress theme like the_basket that is outputting that chunk of HTML.
    • Use that function within your wordpress theme where the shopping cart should be displayed.

    Next to that display performance in a browser is always best, when you provide all HTML before displaying. That is, if the <div> is already part of the page when the browser downloads it from the server. That’s also best network performance as there is no additional request as with ajax.

    This method even tops ajax in any case if javascript is disabled or not working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Colorbox, and I want to load a specific div from another page
I have a page http://www.mysite.com/image.aspx , that I want to load and display an
I am trying to load a div from another domain and display it on
I'm trying to load content from another page div into another page div. What
I want to use .load to change a div's text based on another page
I want to get data from an HTML web page, then display it in
I am loading a registration form from another page. The load works great. I
I want to load content of my page inside a div element using this
I'm trying to pull the contents of Div from another page of the site
I have 2 div one to load data from an ajax request and another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.