Answer the question
In order to leave comments, you need to log in
Improving the PageSpeed score. How to cache data on CDN cloudflare?
Hi all!
Improving PageSpeed score . How to cache data on CDN cloudflare?
Use the browser cache for the following resources:
cdn.ecuras.com/img/main/DnPriceTag.jpg (no expiration date specified)
cdn.ecuras.com/img/main/DnValueRec.jpg (no expiration date specified)
cdn.ecuras.com /img/main/KeyboardCloseupRectangular.jpg (no expiration date)
cdn.ecuras.com/img/main/SeoDemystified.jpg (no expiration date)
cdn.ecuras.com/img/main/WebDesign.jpg (no expiration date ) validity)
cdn.ecuras.com/img/main/Workshop2_Rec.jpg (no expiration date)
cdn.ecuras.com/img/main/WorkspaceRectangular.jpg (no expiration date)
cdn.ecuras.com/img/main/WritingInDiaryRectangular.jpg (no expiration date specified)
How to cache data on CDN cloudflare? How can I do this, who faced?
Answer the question
In order to leave comments, you need to log in
var trouble = +prompt('What is wrong?');
var CABEL = 1;
var ROUTER = 2;
var COMPUTER = 3;
switch (trouble) {
case CABEL:
console.log('check your cabel');
break;
case ROUTER:
console.log('check your router');
break;
case COMPUTER:
console.log('reload your PC');
break;
default:
console.log('uncorrect trouble');
}
var trouble = prompt('What is wrong?');
switch (trouble) {
case 1:
console.log('check your cabel');
break;
case 2:
console.log('check your router');
break;
case 3:
console.log('reload your PC');
break;
default:
console.log('uncorrect trouble');
break;
}
1) prompt returns strings, comparison with numbers is incorrect
2) in blocks with if ()... you constantly compare with constants, although a little earlier they declared their "semantic load"
Accordingly, it would be better to do this:
1) var trouble = parseInt (prompt('What is wrong?'))
2) if (trouble == cabel) {...
...
else if (trouble == router) { ...
...
else if (trouble == computer) { ....
Your code works for me
here
And in general, you should not neglect ";" at the end of the line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question