Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jack

Privileged
  • Joined

  • Last visited

Everything posted by Jack

  1. Jack replied to portia79's topic in Frontend
    There's a tab in Chrome's developer tools that does it, but it's only per page - https://developers.google.com/web/tools/chrome-devtools/coverage
  2. Definitely, it needs to be moved to a new theme, but it can probably be patched out of the fatal error initially to give everyone time to move the site over.
  3. It's entirely possible a developer could copy the theme and patch it to work with PHP7 if the client is desperate. You ideally want to move to something that's better suited as soon as possible though but sometimes a solution needs to be put in place even if it's temporary.
  4. Has the version of PHP running on your server changed recently? Also are the plugins running on the site up to date? It's possible your host has updated past PHP5 to PHP7+ which will cause this error. You can get the current PHP version by adding <?php phpinfo(); ?> on a template that actually loads.
  5. Could you change the fadeIn method so that the next item starts fading in before the fade out has had time to finish? For example, if the fadeOut is 1500, then the fadeIn starts at 1300, that way the image won't be fully transparent and won't have a white background.
  6. Invest the cost of a single sale of one of the globes into a new site, better photography and content that you can use to better market and sell your products. A site like this is doing you no favours, it's dated and offers a poor user experience for product discoverability. Weirdly enough you seem to have quite a popular Facebook page and a suspended Twitter account so I'm wondering if at some point you purchased followers? If that's the case I would suggest starting again not just with your website but on your social channels to improve your brand legitimacy. Here's one of your competitors - https://bellerbyandco.com, and while it's not a perfect site, it has decent product photography and it comes across as a more trustworthy business to deal with online. The 18,250 real Facebook followers proves that too and the content on the Twitter profile ties into the brand very well https://twitter.com/globemakers, they seem to good job on both. This is the level you need to be at, or more, to be competing with similar businesses online.
  7. That's strange, the only times I have seen something like this myself was down to one of these issues: The CDN wasn't configured properly or didn't make use of all datacenter regions Testing without a CDN was done from the same location as the server The domain used to request assets wasn't a cookieless domain or had redirects on which slowed the process down Apart from that they tend to be the recommended approach but they do take a while to setup properly, which is why Cloudflare is useful.
  8. Jack replied to portia79's topic in Frontend
    The main thing you want to manage properly in CSS is specificity and also the way you name things. It's extremely difficult to get around specificity and refactor out, and it's probably the biggest reason that CSS starts to become difficult to maintain in projects https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/. I organise everything using the ITCSS architecture by Harry Roberts to avoid specificity issues - https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/, there's also a talk on it here https://youtu.be/1OKZOV-iLj4?t=520. These days I also use mainly utility classes in my code using a framework called Tailwind, but I still put everything in that structure. You should avoid grouping things like font styles to specific components, there's a very good chance you'll need to use the same style somewhere else. I tend to style paragraphs, heading etc within an elements directory, and also have utility classes I can use to amend typography when I need to. Regarding media queries, I put them all in the same file as the component I'm working on. For example, if it's a header, I'll have a component.header.css file that has the layout styling and media queries. Tailwind actually moves all of these out for you and places them at the bottom of your main stylesheet to avoid issues. These days I have less media queries anyway because Tailwind generates responsive variations of classes, so I can use things like l:text-red for large screens.
  9. I have never had that happen using cache busting. You're changing the file name so it will never match an existing file in the cache. If you really wanted to be safe you could generate a file like style.v1.css instead.
  10. Look for a live chat provider, sign-up, add the code they provide to your site.
  11. If you use a timestamp it changes with the current date and time, something like <?php echo time(); ?> will change on every page load, but you could leave ?v1.0.0 appended for months if you wanted to. Some people will add a timestamp because it means your assets will never cache, but there's no need to do this, and it actively goes against improving the performance of your site.
  12. It depends if you're getting noticeable latency when assets are being requested, I don't think I have seen page speed insights mention that before though. A CDN can help if your server is particularly slow or your customers are in a different part of the world compared to the location of the your server. You could try it and see if you get improvements. The Amazon route is fairly complicated if you're not familiar with AWS, you have to setup Amazon S3 and Cloudfront to work together. You could try something like Cloudflare which offers a tonne of the box for free including a global CDN and caching. It woks using DNS so it's straight forward to setup, just make sure your DNS records are correct on your domain.
  13. They're probably talking about a CDN, which will allow you to fetch your page or site assets from the closest available server to reduce latency. If your site is slow enough to cause SEO issues then using a CDN will have a minimal affect, it's not a silver bullet. You need to tackle the root cause and start to address the speed issues, then you can look at network optimisations like caching and CDNs.
  14. You can append a version number to the end of the file path to force the browser to fetch a new copy. Some people use a current timestamp for this but I recommend not doing that otherwise the file will never be cached. You actually want it to be cached as much as possible, and only force a new download if the file has changed. file.css?1.0.0 file.js?1.0.0 If you're using PHP this is simple enough to do automatically by getting the file modified time with filemtime. If you're using WordPress you can use the above function when enqueueing files too https://wordpress.stackexchange.com/questions/269736/add-last-modified-time-as-version-to-css-and-js/293493.
  15. It's a bit messy but this should be roughly what you're after. https://codepen.io/jackpallot/pen/xxwZZvq
  16. What are you using to get ES6 support? If you're using something like Webpack or Parcel, you should have a build step. It's unlikely you want to serve files directly from your src directory, typically your build step will do things like minify scripts, run them through Babel etc, and place them in a build or dist directory. You will need to tell your host that this is the directory that you want to serve files from.
  17. Yeah that is a common issue, the content is always in the ideal format with good imagery. Things go south pretty quick when people can't produce good content. Regarding data, that's also correct. You want to keep the data you're storing as clean as possible and not tie it into things like the look and feel of the website. Otherwise it's very difficult to redesign the website or migrate it away.
  18. You don't have a captcha to prevent spam bots from submitting the form on your site. You need to add something like the following: A honeypot script (a hidden field that spam bots will fill out, that if done so prevents the form being sent) Google reCaptcha - https://www.google.com/recaptcha/intro/v3.html hCaptcha - https://www.hcaptcha.com/ Also, I noticed your site uses a plugin called Contact Form 7. You can find plugins that help with this specifically for Contact Form 7, such as https://wordpress.org/plugins/contact-form-7-honeypot/ and https://contactform7.com/recaptcha.
  19. Yeah don't use any page builder, it doesn't matter what it's built in, all of them are terrible. I would build your own theme if you have the knowledge to. I don't understand the hype around page builders, it's significantly slower to build pages and add content with them, than it is with a properly structured CMS. Even if you don't come across this problem initially, you will at some point. If I had to add a block, a row, a column, padding, a background etc for every element I needed to build a page out of I would lose my mind. It's no wonder it takes forever to add a page and even then they never look consistent. People adding content typically aren't designers, so it's ridiculous to put layout tools like this in their hands and expect a good result. Also, the site will become slow because they overload your code with style tags and HTML markup. It also messes up your database because page builders typically store everything inside database tables. This also has the downside that you can never do a migration of your content to another CMS or system, or do any reporting, without first having to strip all of the page builder markup out.
  20. I'd say improving your knowledge when it comes to code is a series of small lightbulb moments and not one large one. Experienced programmers have just had more of these, but as you solve problems, fix bugs etc you'll start to build up a collection of your own. Over time you'll look at what you're able to do now and remember how you used to struggle doing the same thing. That's how progress is made, even if it seems like there's still a lot you don't know.
  21. I was just curious. I know a few alternatives exist already like Netlify CMS that are open source too. It seems to be the way the CMS's are going, Craft are launching a hosted solution on a serverless infrastructure later this year, and the CMS already has GraphQL built in. If it works like I expect then it's something that really interests me. I have been waiting for something with that level of flexibility that I can hook into something like Next.js and not have to worry about hosting.
  22. I agree with the idea of using a CMS only to manage the content side, but have you used Contentful in a personal project? It's incredibly expensive for what it does, even at $40 a month you only get access to a REST API, a few field types, and a single user account. To get GraphQL you need the enterprise pricing which is thousands and to be honest doesn't justify the cost unless you're a business that makes heavy use of it.
  23. I don't write in low-level languages so I'm not 100% sure, but it's possibly a pointer to the place in memory where that code is stored.
  24. Any kind of automated detection is typically error prone. When you start getting into things like IP and language detection you should always have a fallback. When I enter navigator.language I get en-US, which isn't technically true even though I'm English speaking. You could probably use it for some base level detection, but I would always have a flag or language switcher just in case it's not correct. For a simple site I wouldn't bother with any detection. I would default to English and have a visible language switcher. After a few months you can take a look at your analytics to see if this needs amending based on where people are visiting, how often, and what the bounce rate is for certain countries. It might be that it makes sense to try and detect location, or it could be that it wouldn't make much difference because you rarely get visits outside of the UK anyway.
  25. Nope, your best bet is to ask the user to specify a language and link to a dedicated page or sub site.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.