webdev: reddit for web developers

Subscribe to webdev: reddit for web developers feed
Updated: 7 min 40 sec ago

What are the general rules for images on a website?

35 min 49 sec ago

I mean in terms of sizing and optimizing. Let's say i want to use 5 thumbnails and a hero picture. this site says thumbnails should be 30kb and "larger ones" 60-100kb. I saw that google has a tool to reduce file size in pictures but if i was about to crop them first for my own usability, what are the things i should look out for?

submitted by /u/LeBigMac84
[link] [comments]
Categories: Web Development

New website advice

1 hour 23 sec ago

Hi reddit,

(first of all, my apologies if I break the rules if this question is too much in line with the "how to get started" FAQ

So, as a sort of hobby/project I want to create a website that I want to use for playing and keeping track of a D&D campaign. For those that do not know what that means, the website will have to do sort of the following tasks:

  • keep character sheet information: this is basically a bunch of text and number in editable fields with some simple calculation.
    Made into a nice looking page
  • character inventory: also some basic editable text and stats with some simple calculations, mainly needs to look nice
  • crafting: simple calculations and some random numbers to simulate dice rolls
  • campaign diary: just text with maybe some pictures and a map

At the moment I have no experience with WebDev, but I work in IT and I am fairly quick in learning new stuff. I hope I can get some pointers on language, tools, editors,.... that would be most beneficial to learn for this (with hopefully a low difficulty entry point). I know I could probably do all of this in Google Spreadsheets, but it is more about the building than the result.

Thank you for any advice.

submitted by /u/gjerdsen
[link] [comments]
Categories: Web Development

Google indexes random spammy links from my Wordpress website

1 hour 6 min ago

Hello everyone,

I've been battling with one frustating issue regarding my Wordpress installation.

Recently I noticed that Google started to index my website - so far all good. What's not good is that one day I decided to scroll a few Google result pages and I noticed that something is off. There are spammy links coming from my Wordpress website, that, if clicked on, return a 404 error. After some time new spammy links appear, but I haven't had more than 10-15 spammy links.

The actual links of pages my website has are indexed with priority so that is at least good. You can see the spam only if you go multiple pages back.

Has anyone ever experienced something like this?

Things I've tried:

  • Reinstall Wordpress installation, rebuild the website from scratch
  • Reinstall Apache
  • Update everything
  • Request Google URL removal (but they appear again after some time - meaning Google thinks these are actual pages - malware makes Google think that and I need to get rid of it). Google states, that in order for removal tool to be permanent, actual pages need to be removed. I don't know what to do.

Things I haven't tried:

  • Reinstall the machine it's hosted on (I will do this if there's absolutely no way of pinpointing the issue or at least finding the source of the malware). It's ran on Ubuntu 16.04. Reinstalling is the last resort.

Links look like this (I have removed the domain name from images for privacy. I will reveal it if it will be necessary to find out the issue).

https://i.redd.it/8bhjqwzcm6b21.png

Mind you, the spammy links date way back to 2013-2014. The website was launched late 2018. I host it on a private machine and have applied all server related security measurements I could've thought of at the time

Has anyone got any idea? The site is registered in Webmaster Tools and Analytics, if anything.

If any of you indeed are able to pinpoint the issue and the root of the malware and how to get rid of it, please do so. If, after whatever fix needs to be applied, everything works as expected, I will do my best to reward you (Paypal only).

submitted by /u/NKNZ
[link] [comments]
Categories: Web Development

Beginner Questions - January 18, 2019

1 hour 16 min ago

If you're new to web development and would like to ask experienced and professional web developers a question, please post below.

Etiquette
  • Remember, that questions that have context and are clear and specific generally are answered while broad, sweeping questions are generally ignored.

  • Be polite and consider upvoting helpful responses.

  • If you can answer questions, take a few minutes to help others out as you ask others to help you.

submitted by /u/AutoModerator
[link] [comments]
Categories: Web Development

Website for plex/emby users

1 hour 22 min ago

I would like to make a simpel website so people using the sites doesn't have to type in the ip for plex or emby. I was thinking something like a black page and there would be square icons for each of the ip's i just don't know how to get started doing something like this.

I will also be hosting the site on my own server and id like to know how to do this ?

submitted by /u/luka1745
[link] [comments]
Categories: Web Development

What are the tell tales of a lazy, unprofessional, poorly financed website?

1 hour 35 min ago

Background - I work in IT Security and one of the threats we face is an attacker setting up a malicious website and spear-phishing a user in order to get them to visit the site and become infected by malware. The attackers are typically not professional web developers and their website/domains often don't include privacy policies, use free "Lets Encrypt/Comodo" 90 day certificates, register the domain for only a year (because it's for a bespoke phish), don't use their own mailservers for email etc etc. What other things would you expect to see (in terms of HTML/CSS/Javascript) that would suggest the site is transient or has been produced by an amateur?

My plan is eventually to write some code that will visit websites and detect all of these tell-tales, then score the site and alert if it looks suspicious. Many thanks.

submitted by /u/m0wax
[link] [comments]
Categories: Web Development

Help with ajax request in php/js

1 hour 52 min ago

The following is the code:(I took from w3schools php ajax and modified a bit)

function showHint(str,value\pr) {)

var val\obt= str*value_pr;)

var xhttp;

var xmlhttp = new XMLHttpRequest(;)

xmlhttp.onreadystatechange = function( {)

if (this.readyState == 4 && this.status == 200 {)

document.getElementById("print\ajax").innerHTML = this.responseText;)

}

xmlhttp.open("GET", "calculate.php?q="+str, true;)

xmlhttp.send(;)

}

}

The calculate.php has only one line of code,echo $res === "" ? "" : $q;

I might be doing it hugely wrong, help me please.Also I've tried using this line to pass the 2 values to php as follows:

xmlhttp.open("GET", "calculate.php?q="+str\value_pr, true);)

and I used explode function to separate the text before and after * in the string and multiplied and echo the result. Nothing worked.

submitted by /u/NinjaKnock
[link] [comments]
Categories: Web Development

Nginx serving old version of website

2 hours 37 min ago

Please help for some unknown reason, an old version of my website is now being served and none of the css files that relate to it actually exist on my dev laptop or the server. I had the site working fine yesterday and just pushed an update only for the original version to be the one that is shown in the browser.

Website is using django - manage.py collectstatic has been done.

Nginx status is running and healthy - sendfile is set to off.

gunicorn is up and running

Postgresql is also upto data and running

all migrations have been done and the settings.py file is the production version with allowed hosts correct and debug set to off.

It seems to me that Nginx is serving cached files from somewhere, but I can't find where that folder is. I don't know what to do, the site is down purely because the wrong versions of static files are being served

submitted by /u/iFunktion
[link] [comments]
Categories: Web Development

Free PHP Google Maps private API

2 hours 49 min ago

Words of my friend juanmipw, all credits for him:

I want you to know i'm developing a "free gmaps private api" you can check at github page.

https://i.redd.it/dt7z2f6a56b21.png

What does gmaps-facade do?

Main features:

  • Get Location name by geocoords.
  • Get geocoords by name location.
  • Get satellite image by coords (in progress).
  • And much more to develop...

Installation:

Using Composer:

composer require juanmicl/gmaps-facade <---- PHP CODE ----> include __DIR__ . "/../vendor/autoload.php"; $gmaps = new \GmapsFacade\Gmaps(); <---- PHP CODE---->

Examples:

Get Location name:

<---- PHP CODE ----> include __DIR__ . "/../vendor/autoload.php"; $gmaps = new \GmapsFacade\Gmaps(); $data = $gmaps->getPlace(40.4167754,-3.7037902); echo json_encode($data, JSON_UNESCAPED_UNICODE); <---- PHP CODE ---->

Output:

<---- JSON ----> {"0":{"name":"Madrid","x":40.4167754,"y":-3.7037902,"m":"40.4167754,-3.7037902"},"success":true} <---- JSON ---->

Get Coordinates by location name:

<---- PHP CODE ----> include __DIR__ . "/../vendor/autoload.php"; $gmaps = new \GmapsFacade\Gmaps(); $data = $gmaps->getPlace(40.416775,-3.703790); echo json_encode($data, JSON_UNESCAPED_UNICODE); <---- PHP CODE ---->

Output:

<---- JSON ----> {"0":{"place":"Puerta del Sol","cp":"28013","location":"Madrid"},"success":true} <---- JSON ---->

Online examples:

http://api.juanmi.pw/maps/getCords.php?sitio=Madrid

http://api.juanmi.pw/maps/getSitio.php?x=40.416775&y=-3.703790

submitted by /u/BISH4
[link] [comments]
Categories: Web Development

Will receiving traffic from external 302 redirect affect my SEO?

3 hours 23 min ago

Hi all,

Let's assume a website writes about mine and creates a direct link to it, but an external tracking company will always perform a 302 redirect. So they take my link from the website to them, note down whatever info they need, then send the user to me.

Will this affect my SEO in terms of backlinking? As the original website direct linked to my site, it shouldn't make any difference right, and therefore help me SEO as I'm receiving a higher number of legitimate back links?

submitted by /u/claret_n_blue
[link] [comments]
Categories: Web Development

Had my first meeting with my client today

3 hours 37 min ago

Everything went well. However, because it is my first client building a website and I mainly doing this for the experience we did a deal where I would get a free personal trainer session for an hour after I have created the website, which I am happy about.
I want to share what I am doing this weekend and see if everything I am doing is right, or if not, share me some ideas on what I should do.
Anyway, throughout the meeting, we discussed what is the main purpose of how the site should look and run. Focusing more on the content of the site. My client wants the site to show a testimonial video with his logo as the header, then scroll down to find nutrition, Instagram-feed, Facebook-feed, photo-gallery feed sections and a footer for contact details + a map to find the gym. And one or two pop-up alerts on deals such as a 4-week training plan.
This to me is doable, not easy, but doable for me to create.
As this is my first site, I am going to create it on WordPress. I know how to work on HTML, CSS, JavaScript, BootStrap and a bit of PHP. However, I am a newbie on WordPress. So today is going to be a full day of plans, watching WordPress videos on tutorials such as plugins and themes, read blogs and forums, ask questions, and plan the layout. The weekend is to get the site up and running.
What do you all think?

submitted by /u/FriendlyMinimum
[link] [comments]
Categories: Web Development

Open Source - Do u?

4 hours 37 min ago

Hey all,

Just wondering how many of us web devs actively participate in open source projects? If you are, do you know of any good projects to get involved with as someone new to it?

Thank you!!

submitted by /u/aiiqi
[link] [comments]
Categories: Web Development

What type of service is good to use for a timer based app?

5 hours 26 min ago

Basically I am creating a app that increments a variable every second.

I thought about using IntentService but I've ran into trouble when trying to figure out how to pause and resume the execution of the IntentService. Do I just keep trying to use IntentService and use a BroadcastReceiver to end the thread, save the state of all the variables in the IntentService and create a new IntentService when the user tries to resume? Or is it easier to use regular service? Thanks!

submitted by /u/Okmanl
[link] [comments]
Categories: Web Development

Pages