/    Sign up×
Community /Pin to ProfileBookmark

jquery doesnt load in chrome

HI,

I am not really a web developer, but I have designed a web server for esp32 controller but I have encountered 1 problem, the page loads differently in chrome & firefox. I have tried mobile chrome & firefox also the result is the same.

there is a script that I have added for **jquery** when there is no internet connection load jquery file from device. here is the script, I believe this fails, I had got this from StackOverflow

`<script src=”https://code.jquery.com/jquery-3.5.1.min.js”
integrity=”sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=” crossorigin=”anonymous”></script>`

`<script type=”text/javascript”>
if (typeof jQuery == ‘undefined’) {
document.write(unescape(“%3Cscript src=’./js/jquery.js’ type=’text/javascript’%3E%3C/script%3E”));
}
</script>`

I need guidance to know why chrome displays differently

here is the image from chrome https://imgur.com/UvRcOF1

an this from Firefox: https://imgur.com/a/XmfcqHt

this chrome list of files https://imgur.com/AXYt2vP

to post a comment
Full-stack DeveloperJavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumOct 14.2021 — Why load the file from CDN when a local version is available? Include that one unconditionally and only and everything will be fine.
Copy linkTweet thisAlerts:
@demo_htauthorOct 16.2021 — @Sempervivum#1638193

> Why load the file from CDN when a local version is available?

when internet access is there, load file from CDN its quick & app loading is fast, but when no internet load from local memory its slow & page loading takes too much time
Copy linkTweet thisAlerts:
@SempervivumOct 16.2021 — @demo_ht#1638235 I gave it a try: Loading jQuery 3.4.1.min from CDN takes 114ms, from my own webspace at all-inkl it takes 68ms.
Copy linkTweet thisAlerts:
@demo_htauthorOct 16.2021 — @Sempervivum#1638238

so i tried , using JUST CDN with internet connection the page loaded good, but on JUST local its same on chrome.

the thing is i dont understand how its different in chrome & firefox, how firefox load good in both condition.
×

Success!

Help @demo_ht spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...