chrome, firefox and safari page looks different [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I made a site using a template someone else purchased and I made modifications to it quickly and uploaded it splurg .co
I am working on the live app and have been away from webDev for a while and would love to know why on my system in three different browsers the page seems to react differently. And what I can do to figure out how to fix each page / or my setup ?
the page in question and on my chrome does not show a backgoround image and in firefox it renders.
I am curious on how I can figure this out myself, I've look at dev tools and it appears to get the image just never loads it.
Since I checked the site at work using chrome ( and it worked there ) I added an screenshot, since it seems to just fail on my own personal system and no where else ?

This is a very common issue with different browsers. A google search on cross browser compatibility will give you a lot of reading material as well as resources to help solve the issue. Different browsers use different parsers and rendering engines. As such, different browsers yield different results of the same website. That is why IE is one of the most hated browsers by web developers. It usually has to do with CSS. For example, some CSS properties are not honored in certain browsers and sometimes you have to prefix the property with browser specific prefix to make it work like -moz-box-sizing Notice the -moz- prefix.
Also, if your template is using CSS3 that is a whole another bag of worms. Hope it was helpful and happy coding.

Related

Where are websites html/js stored on local computer, in chrome, windows 10? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
When typing some url, e.g www.google.com (or www.news.com or any other), some client-side code gets downloaded to my local machine, so that the browser can display and run whatever is in there.
I would like to look at that code and maybe slightly modify it.
My google searches failed, probably because I am unfamiliar with the correct terminology for what I am searching. I wasn't even sure about which tags to put on this question.
Where are websites client-side files stored locally? Specifically on chrome, windows 10
If you want to view and edit at the source of the page you're currently looking at, and have your changes reflected in the page immediately, use the browser developer tools (this will be much better than "View source", as it will interpret any clientside DOM generation, give you a collapsible, edited, nested-list view of the DOM, etc).
If you want to make changes that would persist, i.e. every time you view a particular website your changes will be applied to it automatically, then you're looking at building yourself a browser extension, either for your specific browser or cross-browser.
Browsers don't, as far as I know, store the source of a page during render on disk in any way that can be viewed or usefully modified.

Is it possible to make a web-app which works offline? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I know I could utilize client-side storage, cookies, WebSQL to make an app independent of the internet if the tablet/phone went offline for a bit. But at the end of the day if the user refreshes the browser, the site will try to load the HTML/CSS/JS and it's going to fail to load. I haven't been keeping up on HTML5 enhancements in the last year so I'm wondering if something like this exists. For instance specifically telling the browser to cache the static assets and use them again upon reload unless newer versions exist.
NOTE: I'm only interested in how to allow the page to go through a reload with the site offline if such thing exists.
I believe that #NickZuber has answer my question with his link. The thing I was looking for is
Application Cache
Works on most (90%+) modern browsers Best suited for storing
application code
The only option to reliably load a website from nothing offline
Can storage a significant amount of data (50mb+)
Very difficult use without causing unintended consequences for most
websites
Here is a working example of it in action. You can essentially turn off your internet, hit refresh on the browser, close the browser and re-open it. Whatever you want and the app loads up just fine complete with Images, CSS Styles, and Javascript.

Turn IE into WebKit by JavaScript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
My html generated pages is working wrong with IE and correct with Safari. I found out https://github.com/trevorlinton/webkit.js project but it still in development and does not support IE. Does exist another ways to turn IE engine to WebKit using JavaScript?
I know about Chrome Frame plugin for IE but it is not what I want
My aim to change engine - my pages generated from another program and that program is anonced as partaly support of IE and full support of Chrome and Safari
So, i think - the easist way to solve problem of IE to turn IE engine to WebKit engine by Javascript
UPDATE
I found out a solution for IE - I made a patch to update my genenerated pages after reverse enginiring of generated pages and scripts - but I like more complex solution
Is it possible to change browser engine by javascript?
Replacing a browser engine from a webpage is a ridiculously dangerous thing even if it was possible. This would open up various security risks because it would allow the engine to be changed to a modified one that contains malicious code, for example, or outdated security technologies.
It is recommended that you actually bother to code with standards rather than just for a specific browser to avoid compatibility issues or broken pages on other browsers.
Providing all the vendor-specific prefixes as well as the standardized version in CSS instead of just one vendor-specific prefix in CSS will ensure greater compatibility across a wider range of web browser engines.
For HTML, ensure that your code is validated properly and closes all tags. Doing this will help improve compatibility on other browsers, as every browser engine uses a slightly different way of interpreting the code.

Is it safe to use JavaScript with IE? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Everytime I think about using JavaScript (or any JS library) I see this red light in front of me. My only concern as usual is IE. So here is what I want to know:
1) Is JavaScript disabled by default in IE8 or IE9?
2) What about you, do you feel safe when including a JavaScript code in a site that may be viewed using IE 8 or 9?
3) I found so many problems when applying CSS rules to html5 tags in IE8 so I used Modernizr. However it depends on JavaScript to enable html5 tags so I could apply CSS rules to them in IE. Am I risking to lose CSS styling as well, by using Modernizr?
No JavaScript is not disabled by default in IE8/IE9
Yes I feel safe, because I code defensively with those browsers in mind if they're mentioned as requirements in the project spec.
Again, code for your requirements. If you have a real reason to believe that modernizr isn't going to cover your requirements, don't use it and style accordingly.
1) No, it is enabled by default
2) Safety is not a concern for you in that case. Nowadays, modern Javscript libraries even support IE quite well. They often implement workarounds for features not supported by IE, so that users just can't use all features the libraries has, but the scripts shouldn't crash any more.
That said, you still need to test your sites in IE.
Javascript has become a widely accepted standard finally.

Javascript : What are the different conditions when javascript work in IE but not in Firefox or some other browser? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Javascript : What are the different conditions when javascript work in IE but not in Firefox or some other browser?
one that i know of is that while using certain window events..
What other scenarios can cause javascript to not work properly?
The answer is too complex to fully list here. Use sites like http://caniuse.com that will tell you which JavaScript is available in which browser.
Generally speaking, all browsers implement JavaScript differently. Microsoft have long been stuck in their own world, implementing their own ways to do things, whereas everyone else seems to try and conform to the standards as much as possible. Microsoft are coming around to the "standards" way of doing things, and from what I hear, IE11 will be a massive step in this direction.
As already mentioned, you can use http://caniuse.com/ to find what you can and can't do in different browsers, but then you'll likely end up doing what many others have done...write your own API which works around these to achieve a task...which is a bit unnecessary, unless you can find a ground-breaking way to implement your API that will be beneficial to other developers.
APIs like jQuery already work around these differences. The aim with these libraries is to provide clean JavaScript, whilst being completely transparent from the underlying JavaScript implementation.
Also, look into "shim"/"polyfill" implementations. These are used when a core feature that is recognised as part of an ECMAScript version has not been implemented in the browser. These provide the implementation for you, if it is not natively supported.

Categories

Resources