How does soundcloud generate their html? [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 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.

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.

Why are some webpages all rendering using 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 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

How to Avoid HTML in 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
I have a lot of elements that are created on the fly from data received on the server, as JSON. To create these elements a lot of HTML is going inside my JavaScript code. Is there any solution to this problem? The JavaScript code is polluted and writing HTML tags becomes harder and less maintainable.
Templating tools such as handlebars, mustache and dust.js were designed to solve this very problem.
Ember.js is another alternative that allows you to remove HTML from your JavaScript through their templating tool called HTMLBars.
Check it out!

What is the difference between EJS and underscore.js' .template() [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
Both seem to be doing very similar things, in a similar way.
Both let you embed javascript into the templates, and have the same 3
types of tags -unescaped replace, escaped replace, embed js-.
Both have the ability to 'precomile' the template by creating the
generator function.
Also, both can be used as the template engine
for express/node.js. (and in the browser, and everywhere else that supports js).
So when having to choose beween EJS and underscore.js templates: what things should be taken into account? Are they the same thing with just different name? If this is the case, why is it that there are 2 template engines so similar?

Categories

Resources