Solved

Modernizr load shiv and respond

Posted on 2014-09-28
4
395 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
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET MVC 5- How can I post textarea value using @Html.ActionLink? 8 60
How to escape unsafe HTML tags 4 36
Asp response.write to clients 6 34
ModalPopup  question 22 39
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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 how to dynamically set the form action using jQuery.
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…

726 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