Why are some webpages all rendering using javascript? [closed] - javascript

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 7 years ago.
Improve this question
I just begin to learn web design. And I want to learn some design style and I noticed that most web pages are part static html and part javasript. But why some web pages are all rendering using javascript? Is it for safe reason or for saving traffic load ? I know using javascript can save the traffic load but I don't know what's the point all using javascript.

If it's a static page, then it's usually not a great use case for all javascript. But if it has dynamic data or interactivity it can be easier to use javascript to create the views as it's rendered rather than rendering it all, and then using javascript to query the elements to make changes or interactivity

Related

A dynamic site that does not use JavaScript [closed]

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 1 year ago.
Improve this question
I started using the python django framework. Can I open a dynamic site without using JavaScript? I find python easy to use and for some reason I don't like JavaScript.
In order to implement dynamic elements (such as displaying messages at button click without updating the site) you need to instruct the browser to change the respective DOM elements.
Currently the only fully supported language that browsers understand for that purpose is Javascript.
There are Javascript alternatives such as Dart or Typescript, but they need to be transpiled to Javascript to work with browsers.
So, practically you cannot build a dynamic website without Javascript at the moment.

How to make different pages using Javascript and HTML? [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'm making a (web) app for a school project, using Phonegap. I'm writing IT in Javascript, HTML and CSS, and I am very new to coding.
My question seems to me to be pretty straightforward, but I can't seem to find any solution on the internet.
I have finished my homepage, but now I need a button which directs you to another page (the menu), from where you can go to other pages within the app. But I just can't find out how to make different pages, and how to direct users to those pages.
There are two ways I see you can do this. Either make a new program (new HTML file) and make the button redirect you to that or completely clear the page using document.write("") and rebuild it.

How does soundcloud generate their html? [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
Today I was inspecting the soundcloud source-html through chrome, but it only returned a basic(very small) html dom.
So I was wondering how do they generate their html?
I'm curious because soundcloud is a pretty big website and I doubt they generate all the html though javascript, but when I checked their javascript I could not find any <div tags or anything like that.
For larger dynamic websites usually a template framework is used like EJS - http://www.embeddedjs.com/
With templating you can embed JavaScript logic directly into the HTML so it changes and updates dynamically.

Real time web screen collaborating app using javascript or C# [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 7 years ago.
Improve this question
I need to create a page which can be shared across multiple users. Means while doing some stuff on my page, that should be broadcast to all the users who are joining me that time. At the same time they can also do some stuff. Something like web conferencing. I need to either use javascript or C#. Is there any API or javascript plugins or any other libraries that I can use? If there then please tell me. I don't need to share desktop just need to share only one part of a web page or only one section only like you can assume I have a particular division, there I have a canvas. On that canvas, I will type or draw something that should be broadcast to everyone.
SignalR is an open source technology built by two Microsoft employees and leverages C# and JavaScript (there is a jQuery plugin for the script side).
A good example to get you rolling would be ASP.NET MVC 3 Real Time Collaborative Apps with SignalR.

What is the best practice using Dynamically generated forms or html imput tags [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Im doing a form where multiple tags appear when certain conditions in the request met, I wonder whether using jQuery to dynamically generate new HTML input tags, or doing all the HTML tags I need in the .jsp file. The first option means making a bigger .js file, the last means making a bigger .jsp file. Are there any advantages of one against the other?
Thanks for your time
It depends.
The main advantage to doing it server-side (jsp in your case) is that your forms remain accessible if the user has turned off javascript or your javascript is broken.
Integrations tests which test your forms will also run faster if you do not need to run a (headless) browser with a full javascript runtime.
However, single-page applications are by nature javascript-heavy. The server often only serves a simple html skeleton which is then populated by javascript. An advantage to this approach is that web apps can be made to feel very responsive since there is a minimal document and the user can start interacting which the page even as it loads.

Categories

Resources