Tool to analyse files using in a website - javascript

A web site project was given to me. There is many CSS and JS files, but I'm not sure that everything is useful.
Do you know if there is a tool able to analyze what and for what are used this type of files, or directly a tool which optimize this files in a web project?
Thank you.

Go to inspector
click audit tab.
click web page performance check box
Click Run Button
You can find what css files are not used

Related

external javascript file not working on blogger

i am using add this tool box on my blog. But i want to optimize my blog so i decided to host that add this javascript file from google drive. But when i hosted the file then javascript is not working. But when i try to use javascript file from add this it works. I have tried hosting another javascript file from google drive for other page on my blog and it worked. Tell me how can i fix it, because i copied the entire javascript code from the add this javascript file.
And i put a script source tag as follows.
https://googledrive.com/host/0BxeU3LVwPHLPUldPSUpLOGtzYUk' type='text/javascript'/>
the file in google drive is at this link
https://googledrive.com/host/0BxeU3LVwPHLPUldPSUpLOGtzYUk
The original javascript from addthis is available at the link below
//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-513959962cb3b4b6
currently i am using the original external javascript file from add this, so the like box is showing. And in case you need my site url it is below :
http://techtrickzone.blogspot.in/
How can i get the javascript file from google drive working ??
Thank you for contacting AddThis support.
I am AddThis support agent Elsa. Unfortunately, we do not recommend copying addthis_widget.js into any other location since we update that file fairly often with fixes/updates. If you copy it, you would be stuck on an older version and you wouldn't get updates. If it makes you feel any better, our assets are highly cached, so they really shouldn't add too much load for your users since all the js/css files are probably already available on their browser.
Feel free to contact us for more questions.
Thanks,
Elsa.

Html and javascript in visual studio 2013

i have been working with visual studio for variety of projects for quite a while now, bu t i recently needed to develop a simple html5 webpage that will use some embedded or a seperate file of javascript, now i know there are asp.net projects which support stuff like that but i wanted to know is there a template or project type or something using which i can work purely with html and js only without having to deal with hell of asp.net configs and pages and all that? just simple html5 and js dev with intellisense and maybe a designer mode for css. i looked over internet and am unable to find an exact answer.
Regards.
If you're starting from scratch you can go to File > New > Web Site and choose ASP.NET Empty Web Site. This will give you a very basic site, which has nothing but a Web.config file. You can then add all of your html, js, and css from there. You can also delete the Web.config file, but it is useful as it allows you to continue to use the debugger on your site.
Alternatively you can just start the project in windows explorer, setup the basic files and site directories, then you can go back into Visual Studio, and go to File > Open > Website and then locate the directory your site is in. This will just open the files and allow you to work on them like any other project.
These are the only ways I've seen so far, you may also be able to find project templates online but I haven't looked.
Also, if you're using Visual Studio in this way, then I recommend installing Web Essentials it adds a lot of useful features.
Hope that helps.

NetBeans plugin to check for unused CSS/JavaScript selectors?

Is there a NetBeans plugin to check for unused CSS and JavaScript across a project? I know there are tools such as Dust-Me (for Firefox) to do this online for one page, however I am interesting in perhaps a plugin that can look across multiple files and find unused resources.
Thank you!
I am unaware of any plugin like this written for NetBeans specifically. If you are interested in looking across all the pages in your project, something like Helium is probably as close as it gets.
While not a plugin for your IDE, you load the JS file into your header so it is present in all pages, and it will scan your site and return a list of unused selectors in loaded stylesheets. Hope this helps!

How can I reverse engineer my JavaScript files with js/uml?

Goal
My goal is to get an UML model out of my JavaScript project (consisting of several .js files) and store it as XMI.
How far I've come
I searched the internet and found out js/uml is the first place to go.
I've managed it to get the js/uml plugin running with Eclipse 3.7.1 (Win32) and a local installation of my pre-downloaded additional plugins:
mdt-uml2tools-Update-incubation-I201103290512.zip (installs required org.eclipse.uml2.diagram.clazz 0.10.0)
jsuml-eclipse-0.8.4.zip (only works with Eclipse 3.7.1 (Indigo))
I loaded the provided example project jsuml-example-yui-0.8.4.zip into Eclipse and added all my .js files to this project also.
Problem
Now I'm stuck and do not get it how to call the reverse engineering of my .js files. I can call 'New'->'Other'->'UML 2.1 Diagrams'->'Class Diagram' from the project's context menu, but I don't get the following steps of that assistant dialog, nor do I get it if this is the right way at all. Please, could you help me with an easy understandable click tutorial? The js/uml homepage does not explain it well enough IMHO. Thanks for your help in advance.
Someone adapted UML for web artifact, its called the "WAE" extension of UML. This way you can see not only your javascript files but the html and css. If you work with node.js, i created a module that generate class diagram for javascript/node/html/css. Its called wavi. For javascript, function,variable are automatically recognized. You can use it for documenting your application.
https://www.npmjs.org/package/wavi
Well, I think I have come quite close.
There's a command-line tool called Code2Flow. which uses GaphViz to generate graphs for Python and JavaScript sources.
I tried it, it does generate the graphs but somehow i can't make to do right.
I hope this will help you or someone.

How to build GWT standalone offline application?

I need to design SPA with GWT technology, but I do not understand clearly how to make (compile) only one page with all JavaScript code in it.
So, for example my task is to make simple page with button and div. You click on button and div appears on page. Simple.
When I did this on GWT, I can not find a way to compile this page in simple index.html with all JS code inside (or in one .js file). Page should work in offline mode.
GWT do it for you. compile it to one .js file?
Here is simple tutorial http://code.google.com/intl/en/webtoolkit/doc/latest/tutorial/gettingstarted.html
If you have any other question, please ask
and have a look at this.allyou need is here
http://www.vogella.de/articles/GWT/article.html
Try Gears with GWT from google here the specs:
http://www.slideshare.net/tom.peck/going-offline-with-gears-and-gwt

Categories

Resources