Jump to content
Sign in to follow this  

About This Club

Have any questions about Web Development? Ask here!

  1. What's new in this club
  2. In robots.txt: # Alexa: https://support.alexa.com/hc/en-us/articles/200450194-Alexa-s-Web-and-Site-Audit-Crawlers User-agent: ia_archiver Disallow: / # Ahrefs: https://ahrefs.com/robot User-agent: AhrefsBot Disallow: / # MOZ: https://moz.com/help/moz-procedures/crawlers/rogerbot User-agent: rogerbot Disallow: / # MOZ: https://moz.com/help/moz-procedures/crawlers/dotbot User-agent: dotbot Disallow: / # Semrush: https://www.semrush.com/bot/ User-agent: SemrushBot Disallow: / User-agent: SiteAuditBot Disallow: / User-agent: SemrushBot-BA Disallow: / User-agent: SemrushBot-SI Disallow: / User-agent: SemrushBot-SWA Disallow: / User-agent: SemrushBot-CT Disallow: / User-agent: SemrushBot-BM Disallow: / User-agent: SplitSignalBot Disallow: / # Majestic: https://mj12bot.com/ User-agent: MJ12bot Disallow: / # SerpStat: https://serpstatbot.com/ User-agent: serpstatbot Disallow: / # MegaIndex: https://ru.megaindex.com/blog/seo-bot-detection User-agent: MegaIndexBot Disallow: / # SEO-PowerSuite-bot: https://www.link-assistant.com/seo-workflow/site-audit.html User-agent: SEO-PowerSuite-bot Disallow: / User-agent: * Disallow: Please note: comments are provided for convenience, but some robots do not handle robots.txt files with comments correctly. Therefore, it is advisable to remove them for use in production.
  3. You should use the "Require" rule instead of "order/allow/deny" directives. They are deprecated and will be removed in future version of apache server. E.g.: 1. When you need to deny access to specific files, then: Instead of this: <FilesMatch "(xmlrpc\.php|wp-trackback\.php)"> Order Allow,Deny Deny from all </FilesMatch> Use this: <FilesMatch "(xmlrpc\.php|wp-trackback\.php)"> Require all denied </FilesMatch> 2. When you need to allow access only from specific IP or range, use this: Require ip # allow connections from specified IPv4 address Require ip # allow connections from specified IPv4 range Require ip 2400:cb00::/32 # allow connections from specified IPv6 range # Allow connections only from CloudFlare (see https://www.cloudflare.com/ips/) Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip Require ip 2400:cb00::/32 Require ip 2606:4700::/32 Require ip 2803:f800::/32 Require ip 2405:b500::/32 Require ip 2405:8100::/32 Require ip 2a06:98c0::/29 Require ip 2c0f:f248::/32
  4. As a developer, I’ll often hear about “slow page load”. Of course, I’m not the only one in this boat. We’ve grown used to visiting sites that perform phenomenally, which adds to how unbearable the experience feels with ones that don’t. There could be multiple reasons behind a slow loading website. One issue that Magento store owners especially tend to face is down to the hundreds of images on their web page. I personally like the Magento 2 lazy load extension with its minimal but excellent features. Should I give it a try.
  5. As far as I know, the only way to deal with it at this time is to set container height manually.
  6. Is there any good solution for fixing the Cumulative Layout Shift (CLS) caused by Google AdSense? How do you deal with it?
  7. I spent some time finding this solution, so I decided to share it with you. There is no sleep() or delay() functions in JS but you can easily implement it on your own using promises in combo with setTimeout(): function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } Usage: await sleep(2000); // Sleep for 2 seconds or sleep(2000).then(() => { // Sleep for 2 seconds and then run the code from this block });
  8. jQuery and Axios are remnants of the past. Fetch API is better: Native support in all modern browsers Better stability and performance No need to download libraries what speeds up page loading and saves traffic Compatible with older browsers (Like IE 10 and 11) thanks to lightweight fetch polyfill and promise polyfill
  9. ZIP support is built into most operating systems by default. Therefore, distributing archives in ZIP format, their authors can be sure that customers can open them. For 7z archives, installation of an archiver is required.
  10. WordPress, Invision Community etc. All of them are distributed in zip archives. Why? As far as I know, the 7z format in the 7zip archiver is much better than zip.
  11. Thank you! Indeed! I'm really tried to connect to MySQL version higher than 8.0.4 and my mysql-connector-java in DBeaver was outdated. I installed a new version of mysql-connector-java and it worked! Many thanks for your help! 🙏🙏🙏
  12. For Laravel 5.8: Run this command in your project directory right after installation of laravel: php artisan preset none
  13. If your application doesn’t need registration, you may disable it by removing RegisterController and modifying your route declaration: Auth::routes(['register' => false]);
  14. I need to disable registration in my laravel app, because i want to have only one user. How can i do that?
  15. This question is quite frequent in a last few days, so here is the instruction. Simplest way to do this on Apache web server is: Add this code into your .htaccess file (must be placed in root directory of your website): <IfModule mod_headers.c> Header set Strict-Transport-Security "max-age=604800; includeSubDomains; preload" env=HTTPS </IfModule> Check if everything OK on your website and subdomains. WARNING: ALL subdomains MUST be accessible by HTTPS if you want to include your domain into preload list. Adding to preload list will make your domain and all its subdomains inacessible by HTTP protocol in all modern browsers. Your users will be forced to use HTTPS only. If everything is OK and you're 100% sure what you're ready to enable HSTS for longer period and be added to preload list, increase you max-age value to 63072000 and add "preload" directive. Your code in .htaccess should look like this: <IfModule mod_headers.c> Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" env=HTTPS </IfModule> Finally add your website to the preload list on https://hstspreload.org/
  • Create New...