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 7718403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:09:35+00:00 2026-06-01T03:09:35+00:00

I am trying to load a JS file using yepnope using the below code:

  • 0

I am trying to load a JS file using yepnope using the below code:

yepnope({
    load: '<?php echo base_url(); ?>static/js/highlight.min.js',
    complete: function()
    {
        hljs.tabReplace = '    ';
        hljs.initHighlightingOnLoad();
    }
});

However when I look in firebug to see what is loading it shows that it is being loaded twice. Am I doing anything wrong because I am confused?

enter image description here

  • 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-06-01T03:09:36+00:00Added an answer on June 1, 2026 at 3:09 am

    Should have really looked harder for existing answers before posting.

    I’m seeing two requests in my dev tools, why is it loading everything twice?

    Depending on your browser and your server this could mean a couple
    different things. Due to the nature of how yepnope works, there are
    two requests made for every file. The first request is to load the
    resource into the cache and the second request is to execute it (but
    since it’s in the cache, it should execute immediately). Seeing two
    requests is pretty normal as long as the second request is cached. If
    you notice that the second request isn’t cached (and your script load
    times are doubling), then make sure you are sending the correct cache
    headers to allow the caching of your scripts. This is vital to
    yepnope. It will not work without proper caching enabled. We actually
    test to make sure things aren’t loaded twice in our test suite, so if
    you think we may have a bug in your browser regarding double loading,
    we encourage you to run the test suite to see if the double loading
    test passes.

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

Sidebar

Related Questions

I'm trying to load a gzipped XML file using simplexml_load_file() PHP function, but I
Okay, I'm trying to load a file in Java using this code: String file
I'm trying to load a flash file using 'AC_FL_RunContent' like below. But the file
I'm following part of this Railscast and trying to load a static file using
I am trying to load a file using the SQL Server Import Data function
Im trying to load an xml file using the jquery ajax function,it works fine
When trying to dynamically load a Javascript file using jQuery I keep getting a
I was trying to load a data file into mysql table using LOAD DATA
We are trying to load a pdf file in web browser using pdfobject javascript
I'm trying to load a .json file with this line: $.getJSON('engines.json',{},function(data){ alert(data); }); If

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.