?
Solved

Modernizr load shiv and respond

Posted on 2014-09-28
4
Medium Priority
?
408 Views
Last Modified: 2014-09-29
Hello Experts,

I am using Modernizr to load the html5shiv.js and the respond.js.
While looking at Internet Explorer development tools -> Network Tab (IE8 mode) It looks like there are double requests for the same files.

Here is a screenshot.   See how the html5shiv.js and the respond.js are being requested twice.

Screen-Shot-2014-09-28-at-22.40.47-.png

Here is how I load the scripts:

<script>
Modernizr.load([
  {
   test: Modernizr.mediaqueries,
   nope: ['http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js', 'http://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js']   
  }  
]);
</script>

Open in new window

0
Comment
Question by:Refael
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 40349754
0
 

Author Comment

by:Refael
ID: 40350143
leakim971, As always and Always.... Thank you :-)

I read the answer on that website. I will check to see if its being cached or not. But now i  know it is "normal" and not something i do wrong.

Did you see that it has been deprecated? Do you know where can i download the new version?

I start to think that experts exchange is..... leakim971
0
 
LVL 82

Expert Comment

by:leakim971
ID: 40350316
there's no new version, it has been replaced by a single script :
https://github.com/SlexAxton/yepnope.js#deprecation-notice

about the cache, i'm not sure you saw my not after the two pictures, iy's about the 304 http code, see the Result column in your screen shot :
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5
0
 

Author Closing Comment

by:Refael
ID: 40350331
leakim971 the Expert. Thank you so much.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

752 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