All Questions
Tagged with web-development javascript
178 questions
2
votes
1
answer
322
views
How do I properly organize JavaScript files for web development?
I am fairly new to web development and have been trying to figure out the best way to organize my JavaScript files for the front-end.
The first approach I started with was "one JavaScript file ...
3
votes
1
answer
256
views
Is it good practice to always use "use strict" in modern web apps? [closed]
I'm learning JavaScript and just came across "use strict". It sounds like to me it should always be in play but me being a beginner I was wondering if there are scenarios/environments when ...
0
votes
1
answer
126
views
How to develop data bound html with strong typing and intellisense?
I'm a huge believer in the value of Intellisense for showing you what syntax is expected and allowed (and also saving typing, though this is a secondary consideration).
When you build a web component (...
0
votes
2
answers
2k
views
Store static data in public folder as json file or directly in .js file?
I'm busy working on a website – somewhat new to this – and I don't quite know where I should store static data: in the public folder as a separate json file, or within the .js file as an object.
In ...
0
votes
1
answer
115
views
How to measure the impact of a website speed optimization
Given:
You have a list of opportunities* that may improve the speed metrics of your website. For example Total Blocking Time (TBT) is one metric that heavily impacts the experience of a visitor.
You'...
2
votes
1
answer
194
views
Would invisible custom elements make sense?
The use case I was thinking about was something like this.
I want to make a calendar for a month as a custom element, and I don't think passing up all the event data as JSON or something is the best ...
6
votes
2
answers
578
views
Is "this" in JavaScript out of fashion?
I'm not a frontend dev, but I recall that a few years ago, the this keyword was commonplace in frontend codebases.
In recent years, I haven't seen this get used anymore. In the last few frontend ...
1
vote
2
answers
786
views
Should a client / server share error codes?
I am in two minds about sharing client / server errors codes. We are writing both ends of the system, if our API was external this would not be possible, but that requirement is very unlikely.
So an ...
0
votes
1
answer
118
views
How encrypting website data works
If i wanted to encrypt a password on my website before its sent to the server, would i have to encrypt the password in javascript on the frontend for it to be hidden over the interent or could it be ...
-2
votes
1
answer
166
views
Modify method behaviour at runtime
I have a scenario where user has multiple filters in a web application and a displayed list of items. In the gui it has multiple FilterGUI that he/she can tune interacting in the browser (these are ...
2
votes
0
answers
2k
views
Setting width/height of unknown images for lazy loading
I have a site where users upload images & can all be viewed on a single page by other users. I want to lazy load images as the user scrolls instead of loading all initially. This is easy enough, ...
0
votes
3
answers
938
views
React - When is a backend necessary?
So I'm currently playing around with web development as a project, and I've been looking at React recently. My current issue is that I'm having trouble distinguishing between front and back end ...
-2
votes
3
answers
76
views
Is there a secure way to ensure a data in an API endpoint of mine came from an Instagram endpoint?
Is there a way through encryption/keys/jwt or anything else to ensure that the data being sent through a POST request is only data coming from another request I made on the client to a 3rd party ...
-4
votes
1
answer
482
views
What is a good book to learn JavaScript for complete beginners?
I could not find a good book for learning JavaScript. I Googled but most books seem to assume that you have some programming experience and don’t teach from the ground up. They assume you should know ...
2
votes
1
answer
2k
views
How to update HTML/JS client from PHP server without refresh intervals?
I am building a simple client-side web page that can be updated from an admin page. I am using PHP for server-side manipulation of the client targeted page.
The setup feels like an overkill to me:
...