0
external files(CSS, JavaScript & Images) not working in my phone.
Hi, I'm facing an issue in my code. I have designed a website using HTML, CSS, and JavaScript, and I've made it responsive with the help of media queries. When I run the index file on my laptop or on someone else's laptop, it looks good, and all the functions are working well. However, when I open the same file on a mobile device, only the HTML file is loading. It seems that not all the external files (CSS, image folder, JavaScript) are supported on the phone. But when I paste the CSS and JavaScript code directly into the HTML file (index.html) and run it on my phone, CSS and JavaScript support seems to work. I have linked the CSS and JavaScript files properly with the HTML file using the correct syntax and also added important meta tags.
5 Respuestas
+ 1
For your solution I thought this might be helpful for you
https://unclebigbay.com/5-steps-to-live-preview-your-web-project-on-mobile-devices
other than this someone to answer your question require some references of your code or the path which you are adding
+ 1
check css and javascript file are on correct path or not..
+ 1
I know this kind of mistake. You control everything and actually it should work. When I look at your text. I would think it too. That's why I think that the statements in your text are not true. This happens to myself from time to time. It is of course only a guess. But in my experience, it is usually the case.
Here are a few possible sources of error.
Errors occurred during copying. Maybe an old version.
The folder structure is different.
Maybe you wanted to be on the safe side and now have css and js in different places, which now causes problems.
And just a tip. Do a little break and come back with a refreshed mind. It helps me a lot in this case of problems.
0
If you do not show your code, then all you can get is guesswork.
Maybe you specified absolute path when linking your external files.
Or your media query might have syntax errors. Or the browser in the phone does not support them.
Have you tried the code in the Sololearn playground?
0
I faced the same issue but for my case, i was using an android device and I found out that the problem is because of android's security measures. I finally got workarounds for it and I even decided to write an article on how to solve the problem. Visit the page below for details
https://nungo.site/guide/css-and-images-not-applying-on-mobile-browsers/