mercredi 27 juillet 2016

Rapid Response CSS

I have an idea to try and make my website load faster, but I want to know if it is actually going to help.

I have a website that is made with HTML, CSS, & JQuery. It runs great on desktop browsers, and is super dynamic. Unfortunately, it is pretty laggy on mobile browsers.

Here is my proposed model for the html layout.

Header Section Loads

  • Bootstrap
  • Fonts
  • JQuery
  • Rapid.css

Now the rapid.css file will have only 1/3rd of the css in it. Just the fonts, basic body settings, ect.

End Section Loads

  • Javascript
  • JQuery docs
  • main.css

The main.css file will contain the other 2/3rds of my css in it. That way, the website does not have to load so much css within the first few seconds of loading the page.

My Questions

  1. Will this idea actually make my page load faster, and if so, will it be enough to count.

  2. Is this the best way to do this, or are there better models out there? How can I get this rapid loading to work?




Is it safe to set permissions of a subfolder of a web server to 777? [duplicate]

This question already has an answer here:

I have a web application which works as a front end to experiments running on a computational server. The computational server writes files directly to a subfolder in /var/www/html of a LAMP server. The computational server uses a key to login to the web server and copy the files into that subfolder.

Now, security wise, is this safe. I mean, can anybody who doesn't have the password or key to that webserver somehow hack that subfolder. If someone can infact crack this, what alternate mechanism I can use to copy data from the computational server to the web server?

P.S I am the sole user of that webserver. I am just concerned about attacks from outside.




cookie alternatives for modern web dev?

Are there any recommended alternatives to cookies for modern web dev? I was trying to refamiliarize myself with cookies for a current task I'm working on and came across this wikipedia article which has an "alternatives" section for cookies:

http://ift.tt/2a06CMS

I was implementing cookies 20 years ago so I wasn't sure if a better more modern approach had emerged and superseded cookies for some use cases.




building a product web directory with scrapping

is there any use of a web spider in building a web direcity website either in Java/Php or python ? confused can you please enlighten me on why and when you need to spider? Is building a web directory all a human based task?

thanks




How to send email with php before a specific date and time? [duplicate]

This question already has an answer here:

How can I send email to a person automatically with php before the exact time. Lets say that I have an Event at 30 July,2016 and I want that through php and auto generated email on 28 or 29 july could be sent to some people?




Uncaught TypeError: Cannot read property 'innerHTML' of null error

I am refreshing display of time after every 1 seconds. I try to prefix that display with text from element divMessage. However, I keep getting the error "Uncaught TypeError: Cannot read property 'innerHTML' of null" error. However, the text of divMessage was assigned without any problems in the document ready function ($function()). So, what is going on here?

<script src="http://ift.tt/1XwG72U"></script>
<script type="text/javascript">
    var myVar = setInterval(myTimer, 1000);
    var loaded = false

    $(function(){
            // Set divMessage text here (I see no errors here)!
            loaded = true
        });
    });

    function myTimer() 
    {
        var d = new Date()
        var dateTime = d.toLocalTimeString()
        var divMessage = ''
        if (loaded)
            // Uncaught TypeError: Cannot read property 'innerHTML' of null" error here!
            divMessage = document.getElementById("divMessage").innerHTML
        document.getElementById("div2").innerHTML = "<span style=\"color:green\">" + 
           divMessage + ", " + dateTime + "</span>";
    }
</script>
</head> 

The elements are defined like this.

<div id="divMessage"><span style="color:yellow">some text</span></div>
<div id="div2"><span style="color:yellow">some text</span></div>




what does telegram look for in order to grab url info?

when you send a URL to your friends in telegram it tries to view info about the URL and even shows a player if it refers to media.

I have a music player page in my website,i like to view a music player in telegram when someone sends the URL of my page to others rather than just viewing a URL.

Youtube does that with videos.